Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion ui/scene_lightgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,25 @@ def draw(self, context):
def draw_lightgroup(layout, group, index, is_default_group=False):
col = layout.column(align=True)

# Upper row (enable/disable, name, remove)
box = col.box()
row = box.row()
col = row.column()

col.prop(group, "show_settings",
icon=settings_toggle_icon(group.show_settings),
icon_only=True, emboss=False)

col = row.column()
col.prop(group, "enabled",
icon=lightgroup_icon(group.enabled),
icon_only=True, toggle=True)

col = row.column()
col.enabled = group.enabled

# Select object linked to Lightgroup

box = col.box()
row = box.row()

Expand All @@ -58,7 +77,7 @@ def draw_lightgroup(layout, group, index, is_default_group=False):

col = row.column()
col.enabled = group.enabled

if is_default_group:
col.label(text="All lights without a group are in the default light group.", icon=icons.INFO)
else:
Expand All @@ -69,3 +88,22 @@ def draw_lightgroup(layout, group, index, is_default_group=False):
op = row.operator("luxcore.remove_lightgroup",
text="", icon=icons.CLEAR, emboss=False)
op.index = index
if group.show_settings:
# Lower row (gain settings, RGB gain, temperature)
box = col.box()
box.enabled = group.enabled

row = box.row()
row.prop(group, 'gain')

row = box.row()
row.prop(group, 'use_rgb_gain')
sub = row.split()
sub.active = group.use_rgb_gain
sub.prop(group, 'rgb_gain')

row = box.row()
row.prop(group, 'use_temperature', text="Temperature (K)")
sub = row.split()
sub.active = group.use_temperature
sub.prop(group, 'temperature', slider=True, text="")