Skip to content
Permalink
Browse files
fix for lightgroup python errors
check whether there actually are lightgroups in the collection before trying to access the active one
  • Loading branch information
scorpion81 committed Sep 1, 2019
1 parent 2ac14c7 commit e32d31f
Showing 1 changed file with 5 additions and 5 deletions.
@@ -947,11 +947,11 @@ def draw(self, context):
sub.operator("cycles.lightgroup_move", icon='TRIA_UP', text="").direction = 'UP'
sub.operator("cycles.lightgroup_move", icon='TRIA_DOWN', text="").direction = 'DOWN'

lg = cycles_view_layer.lightgroups[cycles_view_layer.active_lightgroup]
row = layout.row()
col = row.column()
col.prop(lg, "collection")
col.prop(lg, "include_world")
lg = cycles_view_layer.lightgroups[cycles_view_layer.active_lightgroup]
row = layout.row()
col = row.column()
col.prop(lg, "collection")
col.prop(lg, "include_world")



0 comments on commit e32d31f

Please sign in to comment.