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:
authorJeroen Bakker <j.bakker@atmind.nl>2019-08-27 16:47:30 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-09-04 16:57:00 +0300
commit68d1f091583168dce4e52d3c7378b9b0359e903a (patch)
tree07adc7e5f8f353f4bab9f8cdd6f4fd783a13767c /release/scripts/startup/bl_ui/space_view3d.py
parentd3ab930c880e3a15cd7cd46355663e60119f6bde (diff)
Shading Modes: Material and Render Preview
This change implements the basics as described in {T68312} for the shading modes. * LookDev shading mode is renamed to Material Preview. It always uses Eevee as renderer, and is intended to provide a fast material preview suitable for texture painting, and texture and material setup. * Rendered shading gains "Use Scene Lights" and "Use Scene World" options similar to current Material Preview. These will be enabled by default. When Use Scene World is turned off, HDRIs will be used for lighting instead. These options are available for EEVEE and Cycles. * Renderers will be able to customize the shading settings panel and add additional settings. Reviewed By: brecht, fclem Differential Revision: https://developer.blender.org/D5612
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py36
1 files changed, 28 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index fdf683c16ea..1544cf3e140 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -5057,7 +5057,8 @@ class VIEW3D_PT_shading_lighting(Panel):
@classmethod
def poll(cls, context):
shading = VIEW3D_PT_shading.get_shading(context)
- return shading.type in {'SOLID', 'MATERIAL'}
+ engine = context.scene.render.engine
+ return shading.type in {'SOLID', 'MATERIAL'} or engine == 'BLENDER_EEVEE' and shading.type == 'RENDERED'
def draw(self, context):
layout = self.layout
@@ -5105,7 +5106,6 @@ class VIEW3D_PT_shading_lighting(Panel):
elif shading.light == 'MATCAP':
sub.scale_y = 0.6 # smaller matcap preview
-
sub.template_icon_view(shading, "studio_light", scale_popup=3.0)
col = split.column()
@@ -5115,8 +5115,29 @@ class VIEW3D_PT_shading_lighting(Panel):
elif shading.type == 'MATERIAL':
col.prop(shading, "use_scene_lights")
col.prop(shading, "use_scene_world")
+ col = layout.column()
+ split = col.split(factor=0.9)
if not shading.use_scene_world:
+ col = split.column()
+ sub = col.row()
+ sub.scale_y = 0.6
+ sub.template_icon_view(shading, "studio_light", scale_popup=3)
+
+ col = split.column()
+ col.operator("preferences.studiolight_show", emboss=False, text="", icon='PREFERENCES')
+
+ split = layout.split(factor=0.9)
+ col = split.column()
+ col.prop(shading, "studiolight_rotate_z", text="Rotation")
+ col.prop(shading, "studiolight_background_alpha")
+ col = split.column() # to align properly with above
+
+ elif shading.type == 'RENDERED':
+ col.prop(shading, "use_scene_lights_render")
+ col.prop(shading, "use_scene_world_render")
+
+ if not shading.use_scene_world_render:
col = layout.column()
split = col.split(factor=0.9)
@@ -5128,12 +5149,11 @@ class VIEW3D_PT_shading_lighting(Panel):
col = split.column()
col.operator("preferences.studiolight_show", emboss=False, text="", icon='PREFERENCES')
- if shading.selected_studio_light.type == 'WORLD':
- split = layout.split(factor=0.9)
- col = split.column()
- col.prop(shading, "studiolight_rotate_z", text="Rotation")
- col.prop(shading, "studiolight_background_alpha")
- col = split.column() # to align properly with above
+ split = layout.split(factor=0.9)
+ col = split.column()
+ col.prop(shading, "studiolight_rotate_z", text="Rotation")
+ col.prop(shading, "studiolight_background_alpha")
+ col = split.column() # to align properly with above
class VIEW3D_PT_shading_color(Panel):