diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-07-11 15:00:49 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-07-11 15:02:38 +0300 |
commit | 6e426259b4de01598df564e5998043f5db43f1de (patch) | |
tree | 3775d20809b02f18ec2d0f5ed917c48c8b1564c7 /intern/cycles/blender/addon | |
parent | 6ca5ac208477d89477c5c765bc0798700c7fc784 (diff) |
Fix T99218: light group add button should be disabled when name is empty
Previously it was inactive but still clickable.
Ref D15316
Diffstat (limited to 'intern/cycles/blender/addon')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 77da3f36685..09aecb5cb81 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -1202,7 +1202,7 @@ class CYCLES_OBJECT_PT_lightgroup(CyclesButtonsPanel, Panel): sub.prop_search(ob, "lightgroup", view_layer, "lightgroups", text="Light Group", results_are_suggestions=True) sub = row.column(align=True) - sub.active = bool(ob.lightgroup) and not any(lg.name == ob.lightgroup for lg in view_layer.lightgroups) + sub.enabled = bool(ob.lightgroup) and not any(lg.name == ob.lightgroup for lg in view_layer.lightgroups) sub.operator("scene.view_layer_add_lightgroup", icon='ADD', text="").name = ob.lightgroup @@ -1640,7 +1640,7 @@ class CYCLES_WORLD_PT_settings_light_group(CyclesButtonsPanel, Panel): ) sub = row.column(align=True) - sub.active = bool(world.lightgroup) and not any(lg.name == world.lightgroup for lg in view_layer.lightgroups) + sub.enabled = bool(world.lightgroup) and not any(lg.name == world.lightgroup for lg in view_layer.lightgroups) sub.operator("scene.view_layer_add_lightgroup", icon='ADD', text="").name = world.lightgroup |