Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormakowalski <makowalski@nvidia.com>2021-07-26 05:08:48 +0300
committermakowalski <makowalski@nvidia.com>2021-07-26 05:08:48 +0300
commit3e9249d1aae7d6242b099612cc8552d06f7b8e76 (patch)
treef7a8b884bc6b78c7a0cdb1496748909595704216
parent2d19d141f6b173c67b8b83b5c9b24967a7b14e8e (diff)
USD import: gray out disabled options.
Now graying out, instead of hiding, disabled options.
-rw-r--r--source/blender/editors/io/io_usd.c15
1 files changed, 7 insertions, 8 deletions
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)