diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-11-29 23:33:14 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-11-29 23:52:36 +0300 |
commit | 030f9d084d453c7ea09d38fea3b5231088ff2eb9 (patch) | |
tree | b931e1b87c87babe22656dc4d8dcb3d9cc097efb | |
parent | 4851ec7f192a037335ad8ea78a30617323b42349 (diff) |
Workbench: Add button to go out of studiolight edit mode
This makes it more clean why you cannot choose studio lights in this mode.
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index cc0881e1a9a..045f31c2f7e 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4186,19 +4186,23 @@ class VIEW3D_PT_shading_lighting(Panel): split = layout.split(factor=0.9) col = split.column() sub = col.row() - sub.scale_y = 0.6 # smaller matcap/hdri preview if shading.light == 'STUDIO': userpref = context.user_preferences system = userpref.system - sub.template_icon_view(shading, "studio_light", scale=3) + if not system.edit_solid_light: + sub.scale_y = 0.6 # smaller studiolight preview + sub.template_icon_view(shading, "studio_light", scale=3) + else: + sub.prop(system, "edit_solid_light", text="Disable Studio Light Edit", icon="NONE", toggle=True) col = split.column() col.operator('wm.studiolight_userpref_show', emboss=False, text="", icon='PREFERENCES') split = layout.split(factor=0.9) col = split.column() + row = col.row() row.prop(shading, "use_world_space_lighting", text="", icon="WORLD", toggle=True) row = row.row() @@ -4207,6 +4211,8 @@ class VIEW3D_PT_shading_lighting(Panel): col = split.column() # to align properly with above elif shading.light == 'MATCAP': + sub.scale_y = 0.6 # smaller matcap preview + sub.template_icon_view(shading, "studio_light", scale=3) col = split.column() |