From 1b4f649df542ea6cb528b2b2c9da5b2842dc5fd8 Mon Sep 17 00:00:00 2001 From: Patrick Dulebohn Date: Sun, 16 Oct 2022 15:17:33 -0400 Subject: [PATCH] Make sure material and texture are from the correct object --- korman/ui/modifiers/logic.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/korman/ui/modifiers/logic.py b/korman/ui/modifiers/logic.py index f44033a..c1003f7 100644 --- a/korman/ui/modifiers/logic.py +++ b/korman/ui/modifiers/logic.py @@ -45,9 +45,18 @@ def maintainersmarker(modifier, layout, context): def imager(modifier, layout, context): layout.prop(modifier, "imager_object") - layout.prop(modifier, "imager_material") - layout.prop(modifier, "imager_texture") + + split = layout.split() + col = split.column() + col.enabled = modifier.imager_object is not None + col.prop(modifier, "imager_material") + + col = split.column() + col.enabled = modifier.imager_material is not None + col.prop(modifier, "imager_texture") + if modifier.imager_material and modifier.imager_texture: + layout.separator() layout.prop(modifier, "imager_name") layout.prop(modifier, "imager_type") if modifier.imager_type == "POSTABLE": @@ -72,4 +81,3 @@ def imager(modifier, layout, context): col = split.column() col.prop(modifier, "imager_randomtime") -