diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-08-27 16:47:30 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-09-04 16:57:00 +0300 |
commit | 68d1f091583168dce4e52d3c7378b9b0359e903a (patch) | |
tree | 07adc7e5f8f353f4bab9f8cdd6f4fd783a13767c /intern/cycles/blender/addon/ui.py | |
parent | d3ab930c880e3a15cd7cd46355663e60119f6bde (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 'intern/cycles/blender/addon/ui.py')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index b072d9e583e..6f2794531fd 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -2050,6 +2050,45 @@ class CYCLES_RENDER_PT_simplify_culling(CyclesButtonsPanel, Panel): sub.prop(cscene, "distance_cull_margin", text="Distance") +class CYCLES_VIEW3D_PT_shading_lighting(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'HEADER' + bl_label = "Lighting" + bl_parent_id = 'VIEW3D_PT_shading' + COMPAT_ENGINES = {'CYCLES'} + + @classmethod + def poll(cls, context): + return (context.engine in cls.COMPAT_ENGINES + and context.space_data.shading.type == 'RENDERED') + + def draw(self, context): + layout = self.layout + col = layout.column() + split = col.split(factor=0.9) + + shading = context.space_data.shading + 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) + + 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") + + def draw_device(self, context): scene = context.scene layout = self.layout @@ -2131,6 +2170,7 @@ classes = ( CYCLES_RENDER_PT_simplify_viewport, CYCLES_RENDER_PT_simplify_render, CYCLES_RENDER_PT_simplify_culling, + CYCLES_VIEW3D_PT_shading_lighting, CYCLES_RENDER_PT_motion_blur, CYCLES_RENDER_PT_motion_blur_curve, CYCLES_RENDER_PT_film, |