diff options
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 621a5571f63..c97afa86fad 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -1088,7 +1088,7 @@ class CYCLES_OBJECT_PT_shading(CyclesButtonsPanel, Panel): return False ob = context.object - return ob and has_geometry_visibility(ob) and ob.type != 'LIGHT' + return ob and has_geometry_visibility(ob) def draw(self, context): pass @@ -1099,6 +1099,10 @@ class CYCLES_OBJECT_PT_shading_shadow_terminator(CyclesButtonsPanel, Panel): bl_parent_id = "CYCLES_OBJECT_PT_shading" bl_context = "object" + @classmethod + def poll(cls, context): + return context.object.type != 'LIGHT' + def draw(self, context): layout = self.layout layout.use_property_split = True @@ -1116,6 +1120,10 @@ class CYCLES_OBJECT_PT_shading_gi_approximation(CyclesButtonsPanel, Panel): bl_parent_id = "CYCLES_OBJECT_PT_shading" bl_context = "object" + @classmethod + def poll(cls, context): + return context.object.type != 'LIGHT' + def draw(self, context): layout = self.layout layout.use_property_split = True @@ -1138,7 +1146,7 @@ class CYCLES_OBJECT_PT_shading_caustics(CyclesButtonsPanel, Panel): @classmethod def poll(cls, context): - return CyclesButtonsPanel.poll(context) and not use_metal(context) + return CyclesButtonsPanel.poll(context) and not use_metal(context) and context.object.type != 'LIGHT' def draw(self, context): layout = self.layout |