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:
authorAlaska <Alaska>2022-04-02 23:42:05 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2022-04-02 23:42:57 +0300
commit351c00d29ab1d41867bfbae77b92625e5bf442e6 (patch)
treeb773eb0af8d528cefc59a65090dc009a532d0c8a
parenta567bef5ccae851316868ee427f97e214c2afe61 (diff)
Fix T96973: Re-add Cycles shading menu to lights
This patch re-adds the shading menu to lights to allow people to use lights in light groups. This patch also hides all settings in the shading menu that are not useful for the light object. Reviewed By: lukasstockner97 Maniphest Tasks: T96973 Differential Revision: https://developer.blender.org/D14527
-rw-r--r--intern/cycles/blender/addon/ui.py12
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