[Bf-blender-cvs] [030f9d084d4] blender2.8: Workbench: Add button to go out of studiolight edit mode

Clément Foucault noreply at git.blender.org
Thu Nov 29 21:52:54 CET 2018


Commit: 030f9d084d453c7ea09d38fea3b5231088ff2eb9
Author: Clément Foucault
Date:   Thu Nov 29 21:33:14 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB030f9d084d453c7ea09d38fea3b5231088ff2eb9

Workbench: Add button to go out of studiolight edit mode

This makes it more clean why you cannot choose studio lights in this mode.

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py

===================================================================

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()



More information about the Bf-blender-cvs mailing list