Fix: IO: FBX General import settings layout can't be re-enable

The `General` settings layout can be disabled by unchecking `use_custom_props`,
an since this button button is within this layout it can't be activated back.

NOTE: See that the button can be activated back if the checkbox is still
hovered after being unchecked, if the mouse moves out it can't be enabled back.

Pull Request: https://projects.blender.org/blender/blender/pulls/140228
This commit is contained in:
Guillermo Venegas
2025-06-16 06:26:27 +02:00
committed by Pratik Borhade
parent ab4f5ef5f2
commit a8fdecc0a8

View File

@@ -95,8 +95,9 @@ static void ui_fbx_import_settings(const bContext *C, uiLayout *layout, PointerR
uiLayout *col = &panel->column(false);
col->prop(ptr, "global_scale", UI_ITEM_NONE, std::nullopt, ICON_NONE);
col->prop(ptr, "use_custom_props", UI_ITEM_NONE, std::nullopt, ICON_NONE);
uiLayoutSetEnabled(col, RNA_boolean_get(ptr, "use_custom_props"));
col->prop(ptr, "use_custom_props_enum_as_string", UI_ITEM_NONE, std::nullopt, ICON_NONE);
uiLayout &subcol = col->column(false);
uiLayoutSetActive(&subcol, RNA_boolean_get(ptr, "use_custom_props"));
subcol.prop(ptr, "use_custom_props_enum_as_string", UI_ITEM_NONE, std::nullopt, ICON_NONE);
}
if (uiLayout *panel = layout->panel(C, "FBX_import_geometry", false, IFACE_("Geometry"))) {