[Bf-blender-cvs] [f9cf2e2f6cc] blender2.8: Workspaces: remove workspace engine, use 3D viewport draw mode instead.
Brecht Van Lommel
noreply at git.blender.org
Wed Apr 18 16:38:08 CEST 2018
Commit: f9cf2e2f6cc779764f46dae7ceadc4bb2e9ddcb5
Author: Brecht Van Lommel
Date: Tue Apr 17 13:35:05 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBf9cf2e2f6cc779764f46dae7ceadc4bb2e9ddcb5
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
===================================================================
M release/scripts/freestyle/modules/parameter_editor.py
M release/scripts/startup/bl_operators/object_quick_effects.py
M release/scripts/startup/bl_ui/properties_collection.py
M release/scripts/startup/bl_ui/properties_data_camera.py
M release/scripts/startup/bl_ui/properties_data_modifier.py
M release/scripts/startup/bl_ui/properties_data_workspace.py
M release/scripts/startup/bl_ui/properties_freestyle.py
M release/scripts/startup/bl_ui/properties_material.py
M release/scripts/startup/bl_ui/properties_physics_cloth.py
M release/scripts/startup/bl_ui/properties_physics_common.py
M release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
M release/scripts/startup/bl_ui/properties_physics_field.py
M release/scripts/startup/bl_ui/properties_physics_fluid.py
M release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
M release/scripts/startup/bl_ui/properties_physics_smoke.py
M release/scripts/startup/bl_ui/properties_physics_softbody.py
M release/scripts/startup/bl_ui/properties_render.py
M release/scripts/startup/bl_ui/properties_scene.py
M release/scripts/startup/bl_ui/properties_view_layer.py
M release/scripts/startup/bl_ui/properties_world.py
M release/scripts/startup/bl_ui/space_info.py
M release/scripts/startup/bl_ui/space_node.py
M release/scripts/startup/bl_ui/space_view3d.py
M release/scripts/startup/nodeitems_builtins.py
M source/blender/blenkernel/BKE_blender_version.h
M source/blender/blenkernel/BKE_context.h
M source/blender/blenkernel/BKE_node.h
M source/blender/blenkernel/BKE_scene.h
M source/blender/blenkernel/BKE_sequencer.h
M source/blender/blenkernel/BKE_workspace.h
M source/blender/blenkernel/intern/context.c
M source/blender/blenkernel/intern/scene.c
M source/blender/blenkernel/intern/sequencer.c
M source/blender/blenkernel/intern/workspace.c
M source/blender/blenloader/intern/versioning_280.c
M source/blender/blenloader/intern/versioning_defaults.c
M source/blender/draw/intern/draw_manager.c
M source/blender/editors/include/ED_screen.h
M source/blender/editors/include/ED_view3d.h
M source/blender/editors/render/render_internal.c
M source/blender/editors/render/render_opengl.c
M source/blender/editors/render/render_preview.c
M source/blender/editors/render/render_update.c
M source/blender/editors/screen/workspace_edit.c
M source/blender/editors/sculpt_paint/paint_image_proj.c
M source/blender/editors/space_node/node_edit.c
M source/blender/editors/space_node/node_templates.c
M source/blender/editors/space_node/space_node.c
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/editors/space_view3d/view3d_draw.c
M source/blender/editors/space_view3d/view3d_draw_legacy.c
M source/blender/editors/space_view3d/view3d_select.c
M source/blender/editors/transform/transform.h
M source/blender/editors/transform/transform_generics.c
M source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
M source/blender/makesdna/DNA_scene_types.h
M source/blender/makesdna/DNA_workspace_types.h
M source/blender/makesrna/RNA_access.h
M source/blender/makesrna/intern/rna_context.c
M source/blender/makesrna/intern/rna_layer.c
M source/blender/makesrna/intern/rna_nodetree.c
M source/blender/makesrna/intern/rna_scene.c
M source/blender/makesrna/intern/rna_space.c
M source/blender/makesrna/intern/rna_workspace.c
M source/blender/nodes/composite/node_composite_tree.c
M source/blender/nodes/composite/nodes/node_composite_image.c
M source/blender/nodes/shader/node_shader_tree.c
M source/blender/nodes/texture/node_texture_tree.c
M source/blender/render/extern/include/RE_pipeline.h
M source/blender/render/intern/include/render_types.h
M source/blender/render/intern/source/convertblender.c
M source/blender/render/intern/source/envmap.c
M source/blender/render/intern/source/external_engine.c
M source/blender/render/intern/source/pipeline.c
M source/blender/windowmanager/intern/wm_files.c
M source/creator/creator_args.c
===================================================================
diff --git a/release/scripts/freestyle/modules/parameter_editor.py b/release/scripts/freestyle/modules/parameter_editor.py
index b00b30a9a21..2af6caac4f9 100644
--- a/release/scripts/freestyle/modules/parameter_editor.py
+++ b/release/scripts/freestyle/modules/parameter_editor.py
@@ -1538,7 +1538,7 @@ def process(layer_name, lineset_name):
raise RuntimeError("No Thickness modifier with type", type(m), m)
# -- Textures -- #
has_tex = False
- if scene.view_render.use_shading_nodes:
+ if scene.render.use_shading_nodes:
if linestyle.use_nodes and linestyle.node_tree:
shaders_list.append(BlenderTextureShader(linestyle.node_tree))
has_tex = True
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index 27cc118d99d..24323b1554e 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -365,7 +365,7 @@ class QuickSmoke(Operator):
# Setup material
# Cycles
- if context.scene.view_render.use_shading_nodes or context.view_render.use_shading_nodes:
+ if context.scene.render.use_shading_nodes or context.render.use_shading_nodes:
bpy.ops.object.material_slot_add()
mat = bpy.data.materials.new("Smoke Domain Material")
diff --git a/release/scripts/startup/bl_ui/properties_collection.py b/release/scripts/startup/bl_ui/properties_collection.py
index 60f06b57f3c..e0ac7786b50 100644
--- a/release/scripts/startup/bl_ui/properties_collection.py
+++ b/release/scripts/startup/bl_ui/properties_collection.py
@@ -65,7 +65,7 @@ class COLLECTION_PT_clay_settings(CollectionButtonsPanel, Panel):
@classmethod
def poll(cls, context):
- return context.view_render.engine in cls.COMPAT_ENGINES
+ return context.engine in cls.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index bd80285515b..58cbcec25ca 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -147,11 +147,11 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
- view_render = context.scene.view_render
+ render = context.scene.render
st = context.camera.stereo
cam = context.camera
- is_spherical_stereo = cam.type != 'ORTHO' and view_render.use_spherical_stereo
+ is_spherical_stereo = cam.type != 'ORTHO' and render.use_spherical_stereo
use_spherical_stereo = is_spherical_stereo and st.use_spherical_stereo
col = layout.column()
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 4c2e8e03641..6465f22901a 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -935,7 +935,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
scene = context.scene
- engine = scene.view_render.engine
+ engine = context.engine
show_adaptive_options = (
engine == 'CYCLES' and md == ob.modifiers[-1] and
scene.cycles.feature_set == 'EXPERIMENTAL'
diff --git a/release/scripts/startup/bl_ui/properties_data_workspace.py b/release/scripts/startup/bl_ui/properties_data_workspace.py
index c699fac7dd2..e6ac4ab7477 100644
--- a/release/scripts/startup/bl_ui/properties_data_workspace.py
+++ b/release/scripts/startup/bl_ui/properties_data_workspace.py
@@ -51,15 +51,11 @@ class WORKSPACE_PT_workspace(WorkSpaceButtonsPanel, Panel):
window = context.window
workspace = context.workspace
scene = context.scene
- view_render = workspace.view_render
layout.enabled = not workspace.use_scene_settings
layout.template_search(window, "view_layer", scene, "view_layers")
- if view_render.has_multiple_engines:
- layout.prop(view_render, "engine", text="")
-
class WORKSPACE_PT_owner_ids(WorkSpaceButtonsPanel, Panel):
bl_label = "Workspace Add-ons"
diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py
index d9f28040b16..b1992127932 100644
--- a/release/scripts/startup/bl_ui/properties_freestyle.py
+++ b/release/scripts/startup/bl_ui/properties_freestyle.py
@@ -33,7 +33,7 @@ class RenderFreestyleButtonsPanel:
def poll(cls, context):
scene = context.scene
with_freestyle = bpy.app.build_options.freestyle
- return scene and with_freestyle and(scene.view_render.engine in cls.COMPAT_ENGINES)
+ return scene and with_freestyle and(context.engine in cls.COMPAT_ENGINES)
class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel):
@@ -75,7 +75,7 @@ class ViewLayerFreestyleButtonsPanel:
with_freestyle = bpy.app.build_options.freestyle
return (scene and with_freestyle and rd.use_freestyle and
- scene.view_layers.active and(scene.view_render.engine in cls.COMPAT_ENGINES))
+ scene.view_layers.active and(context.engine in cls.COMPAT_ENGINES))
class ViewLayerFreestyleEditorButtonsPanel(ViewLayerFreestyleButtonsPanel):
@@ -185,7 +185,6 @@ class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel
scene = context.scene
rd = scene.render
- view_render = scene.view_render
view_layer = scene.view_layers.active
freestyle = view_layer.freestyle_settings
@@ -782,7 +781,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan
layout.separator()
row = layout.row()
- if view_render.use_shading_nodes:
+ if scene.render.use_shading_nodes:
row.prop(linestyle, "use_nodes")
else:
row.prop(linestyle, "use_texture")
@@ -813,7 +812,7 @@ class MaterialFreestyleButtonsPanel:
material = context.material
with_freestyle = bpy.app.build_options.freestyle
return with_freestyle and material and scene and scene.render.use_freestyle and \
- (scene.view_render.engine in cls.COMPAT_ENGINES)
+ (context.engine in cls.COMPAT_ENGINES)
class MATERIAL_PT_freestyle_line(MaterialFreestyleButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index 5010ea1e096..233a1c4369e 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -82,7 +82,7 @@ class MATERIAL_UL_matslots(UIList):
layout.prop(ma, "name", text="", emboss=False, icon_value=icon)
else:
layout.label(text="", icon_value=icon)
- if ma and not context.view_render.use_shading_nodes:
+ if ma and not context.scene.render.use_shading_nodes:
manode = ma.active_node_material
if manode:
layout.label(text=iface_("Node %s") % manode.name, translate=False, icon_value=layout.icon(manode))
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 351418c9d23..1528899a4de 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -45,8 +45,7 @@ class PhysicButtonsPanel:
@classmethod
def poll(cls, context):
ob = context.object
- view_render = context.scene.view_render
- return (ob and ob.type == 'MESH') and (view_render.engine in cls.COMPAT_ENGINES) and (context.cloth)
+ return (ob and ob.type == 'MESH') and (context.engine in cls.COMPAT_ENGINES) and (context.cloth)
class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index 15c8bd68d10..3615f8be48c 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -30,8 +30,7 @@ class PhysicButtonsPanel:
@classmethod
def poll(cls, context):
- view_render = context.scene.view_render
- return (context.object) and view_render.engine in cls.COMPAT_ENGINES
+ return (context.object) and context.engine in cls.COMPAT_ENGINES
def physics_add(self, layout, md, name, type, typeicon, toggles):
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index 7fc1c01279d..e1c0606c493 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -55,8 +55,7 @@ class PhysicButtonsPanel:
@classmethod
def poll(cls, context):
ob = context.object
- view_render = context.scene.view_render
- return (ob and ob.type == 'MESH') and view_render.engine in cls.COMPAT_ENGINES and context.dynamic_paint
+ return (ob and ob.type == 'MESH') and context.engine in cls.COMPAT_ENGINES and context.dynamic_paint
class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
@@ -109,7 +108,7 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
elif md.ui_type == 'BRUSH':
brush = md.brush_settings
- use_shading_nodes = context.view_render.use_shading_nodes
+ use_shading_nodes = context.scene.render.use_shading_nodes
if brush is None:
layout.operator("dpaint.type_toggle", text="Add Brush").type = 'BRUSH'
@@ -143,8 +142,7 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel):
@classmethod
def poll(cls, contex
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list