Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-11-29 22:57:09 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-29 23:52:36 +0300
commit48a7785fd453603afcbcae31913ea528469fd934 (patch)
treefa7e6c31b7e95684936360131dee8ee342e4afb7 /release
parent844788a36cb0e1efdf3a2010ee67abcb7c46474c (diff)
Workbench: Add option to have world space lighting in studio light mode
This option is per viewport. Having view space shading make sense when working on isolated objects like if you were holding them in your hands. But for entire scene work, it is better to have the lighting fixed to have a better spatial representation.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index bc38214f101..cc0881e1a9a 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4189,14 +4189,22 @@ class VIEW3D_PT_shading_lighting(Panel):
sub.scale_y = 0.6 # smaller matcap/hdri preview
if shading.light == 'STUDIO':
- # Not implemented right now
+ userpref = context.user_preferences
+ system = userpref.system
+
sub.template_icon_view(shading, "studio_light", scale=3)
- # if shading.selected_studio_light.type == 'WORLD':
- # col.prop(shading, "studiolight_rotate_z", text="Rotation")
+ col = split.column()
+ col.operator('wm.studiolight_userpref_show', emboss=False, text="", icon='PREFERENCES')
+ split = layout.split(factor=0.9)
col = split.column()
- # col.operator('wm.studiolight_userpref_show', emboss=False, text="", icon='PREFERENCES')
+ row = col.row()
+ row.prop(shading, "use_world_space_lighting", text="", icon="WORLD", toggle=True)
+ row = row.row()
+ row.active = shading.use_world_space_lighting
+ row.prop(shading, "studiolight_rotate_z", text="Rotation")
+ col = split.column() # to align properly with above
elif shading.light == 'MATCAP':
sub.template_icon_view(shading, "studio_light", scale=3)