Commit: 3e9249d1aae7d6242b099612cc8552d06f7b8e76
Author: makowalski
Date:   Sun Jul 25 22:08:48 2021 -0400
Branches: usd-importer-T81257-merge
https://developer.blender.org/rB3e9249d1aae7d6242b099612cc8552d06f7b8e76

USD import: gray out disabled options.

Now graying out, instead of hiding, disabled options.

===================================================================

M       source/blender/editors/io/io_usd.c

===================================================================

diff --git a/source/blender/editors/io/io_usd.c 
b/source/blender/editors/io/io_usd.c
index 26eabd0bc90..d0007d9e5be 100644
--- a/source/blender/editors/io/io_usd.c
+++ b/source/blender/editors/io/io_usd.c
@@ -400,14 +400,13 @@ static void wm_usd_import_draw(bContext *UNUSED(C), 
wmOperator *op)
   uiItemR(col, ptr, "create_collection", 0, NULL, ICON_NONE);
   uiItemR(box, ptr, "light_intensity_scale", 0, NULL, ICON_NONE);
 
-  if (RNA_boolean_get(ptr, "import_materials")) {
-    box = uiLayoutBox(layout);
-    col = uiLayoutColumnWithHeading(box, true, IFACE_("Experimental"));
-    uiItemR(col, ptr, "import_usd_preview", 0, NULL, ICON_NONE);
-    if (RNA_boolean_get(ptr, "import_usd_preview")) {
-      uiItemR(col, ptr, "set_material_blend", 0, NULL, ICON_NONE);
-    }
-  }
+  box = uiLayoutBox(layout);
+  col = uiLayoutColumnWithHeading(box, true, IFACE_("Experimental"));
+  uiItemR(col, ptr, "import_usd_preview", 0, NULL, ICON_NONE);
+  uiLayoutSetEnabled(col, RNA_boolean_get(ptr, "import_materials"));
+  uiLayout *row = uiLayoutRow(col, true);
+  uiItemR(row, ptr, "set_material_blend", 0, NULL, ICON_NONE);
+  uiLayoutSetEnabled(row, RNA_boolean_get(ptr, "import_usd_preview"));
 }
 
 void WM_OT_usd_import(struct wmOperatorType *ot)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to