diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2022-05-05 03:43:56 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-05-05 03:43:56 +0300 |
commit | 73fa57159866d6f135690d0ff9a7afb2e8ac8043 (patch) | |
tree | 7413abdb6c582a06430ecb0b55a3ef07246ff3ce /intern/cycles/blender | |
parent | 8960c6e06017a3c3fc90c5745433009c00e64c1b (diff) | |
parent | adbe71c3fabab78985b1fa71a79fc2c03d73f939 (diff) |
Merge branch 'blender-v3.2-release'
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 53 |
1 files changed, 35 insertions, 18 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 131b849a094..886f5345020 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -1446,28 +1446,10 @@ class CYCLES_WORLD_PT_surface(CyclesButtonsPanel, Panel): layout.use_property_split = True world = context.world - view_layer = context.view_layer if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'): layout.prop(world, "color") - row = layout.row(align=True) - row.use_property_decorate = False - - sub = row.column(align=True) - sub.prop_search( - world, - "lightgroup", - view_layer, - "lightgroups", - text="Light Group", - results_are_suggestions=True, - ) - - sub = row.column(align=True) - sub.active = 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 - class CYCLES_WORLD_PT_volume(CyclesButtonsPanel, Panel): bl_label = "Volume" @@ -1616,6 +1598,40 @@ class CYCLES_WORLD_PT_settings_volume(CyclesButtonsPanel, Panel): sub.prop(cworld, "volume_step_size") +class CYCLES_WORLD_PT_settings_light_group(CyclesButtonsPanel, Panel): + bl_label = "Light Group" + bl_parent_id = "CYCLES_WORLD_PT_settings" + bl_context = "world" + + @classmethod + def poll(cls, context): + return context.world and CyclesButtonsPanel.poll(context) + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + world = context.world + view_layer = context.view_layer + + row = layout.row(align=True) + + sub = row.column(align=True) + sub.prop_search( + world, + "lightgroup", + view_layer, + "lightgroups", + text="Light Group", + results_are_suggestions=True, + ) + + sub = row.column(align=True) + sub.active = 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 + + class CYCLES_MATERIAL_PT_preview(CyclesButtonsPanel, Panel): bl_label = "Preview" bl_context = "material" @@ -2308,6 +2324,7 @@ classes = ( CYCLES_WORLD_PT_settings, CYCLES_WORLD_PT_settings_surface, CYCLES_WORLD_PT_settings_volume, + CYCLES_WORLD_PT_settings_light_group, CYCLES_MATERIAL_PT_preview, CYCLES_MATERIAL_PT_surface, CYCLES_MATERIAL_PT_volume, |