diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-17 14:35:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-18 17:35:38 +0300 |
commit | f9cf2e2f6cc779764f46dae7ceadc4bb2e9ddcb5 (patch) | |
tree | 0f409fce181813cab818bfb83a33779e38774684 /release/scripts/startup/bl_ui/properties_view_layer.py | |
parent | 15850a8740ed95afdc5779e224bf40f7540a7d62 (diff) |
Workspaces: remove workspace engine, use 3D viewport draw mode instead.
ViewRender was removed, which means we can't get the render engine for files
saved in 2.8. We assume that any files saved in 2.8 were intended to use Eevee
and set the engine to that.
A fix included with this is that .blend thumbails now draw with Clay mode,
and never Eevee or Cycles. These were drawn with solid mode in 2.7, and should
be very fast and not e.g. load heavy image textures.
Differential Revision: https://developer.blender.org/D3156
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_view_layer.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_view_layer.py | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index 162f8b89a3e..d43f5c43f28 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -29,8 +29,7 @@ class ViewLayerButtonsPanel: @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) class VIEWLAYER_UL_viewlayers(UIList): @@ -55,7 +54,6 @@ class VIEWLAYER_PT_layers(ViewLayerButtonsPanel, Panel): scene = context.scene rd = scene.render - view_render = scene.view_render row = layout.row() col = row.column() @@ -133,8 +131,7 @@ class VIEWLAYER_PT_clay_settings(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -154,8 +151,7 @@ class VIEWLAYER_PT_eevee_ambient_occlusion(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -187,8 +183,7 @@ class VIEWLAYER_PT_eevee_motion_blur(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -217,8 +212,7 @@ class VIEWLAYER_PT_eevee_depth_of_field(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -247,8 +241,7 @@ class VIEWLAYER_PT_eevee_bloom(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -281,8 +274,7 @@ class VIEWLAYER_PT_eevee_volumetric(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -319,8 +311,7 @@ class VIEWLAYER_PT_eevee_subsurface_scattering(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -350,8 +341,7 @@ class VIEWLAYER_PT_eevee_screen_space_reflections(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -385,8 +375,7 @@ class VIEWLAYER_PT_eevee_shadows(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -408,8 +397,7 @@ class VIEWLAYER_PT_eevee_sampling(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -430,8 +418,7 @@ class VIEWLAYER_PT_eevee_indirect_lighting(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout |