[Bf-blender-cvs] [8f747b0763e] usd-importer-T81257-merge: UDS import property UI improvements.

makowalski noreply at git.blender.org
Tue May 11 03:56:36 CEST 2021


Commit: 8f747b0763ea427a3cb40ee2f53bb5648633bbdb
Author: makowalski
Date:   Mon May 10 21:38:20 2021 -0400
Branches: usd-importer-T81257-merge
https://developer.blender.org/rB8f747b0763ea427a3cb40ee2f53bb5648633bbdb

UDS import property UI improvements.

Now hiding the Experimental section if importing
materials is disabled.  Hiding the Import Material Blend
option if Import USD Preview is disabled. Import Material
Blend is now enabled by default.

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

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 40fb07e4ce8..64cf357c568 100644
--- a/source/blender/editors/io/io_usd.c
+++ b/source/blender/editors/io/io_usd.c
@@ -435,10 +435,14 @@ static void wm_usd_import_draw(bContext *UNUSED(C), wmOperator *op)
   uiItemR(box, ptr, "import_proxy", 0, NULL, ICON_NONE);
   uiItemR(box, ptr, "import_render", 0, NULL, ICON_NONE);
 
-  box = uiLayoutBox(layout);
-  uiItemL(box, IFACE_("Experimental"), ICON_NONE);
-  uiItemR(box, ptr, "import_usd_preview", 0, NULL, ICON_NONE);
-  uiItemR(box, ptr, "set_material_blend", 0, NULL, ICON_NONE);
+  if (RNA_boolean_get(ptr, "import_materials")) {
+    box = uiLayoutBox(layout);
+    uiItemL(box, IFACE_("Experimental"), ICON_NONE);
+    uiItemR(box, ptr, "import_usd_preview", 0, NULL, ICON_NONE);
+    if (RNA_boolean_get(ptr, "import_usd_preview")) {
+      uiItemR(box, ptr, "set_material_blend", 0, NULL, ICON_NONE);
+    }
+  }
 }
 
 void WM_OT_usd_import(struct wmOperatorType *ot)
@@ -560,7 +564,7 @@ void WM_OT_usd_import(struct wmOperatorType *ot)
 
   RNA_def_boolean(ot->srna,
                   "set_material_blend",
-                  false,
+                  true,
                   "Set Material Blend",
                   "If the Import USD Preview option is enabled, "
                   "the material blend method will automatically be set based on the "



More information about the Bf-blender-cvs mailing list