diff options
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/addon/__init__.py | 8 | ||||
-rw-r--r-- | intern/cycles/blender/blender_util.h | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/intern/cycles/blender/addon/__init__.py b/intern/cycles/blender/addon/__init__.py index 93a1271b4b4..a8e7428a50f 100644 --- a/intern/cycles/blender/addon/__init__.py +++ b/intern/cycles/blender/addon/__init__.py @@ -88,15 +88,17 @@ class CyclesRender(bpy.types.RenderEngine): # viewport render def view_update(self, context): + depsgraph = context.evaluated_depsgraph_get() if not self.session: engine.create(self, context.blend_data, context.region, context.space_data, context.region_data) - engine.reset(self, context.blend_data, context.depsgraph) - engine.sync(self, context.depsgraph, context.blend_data) + engine.reset(self, context.blend_data, depsgraph) + engine.sync(self, depsgraph, context.blend_data) def view_draw(self, context): - engine.draw(self, context.depsgraph, context.region, context.space_data, context.region_data) + depsgraph = context.evaluated_depsgraph_get() + engine.draw(self, depsgraph, context.region, context.space_data, context.region_data) def update_script_node(self, node): if engine.with_osl(): diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h index 500634e7526..2a964d0e4d0 100644 --- a/intern/cycles/blender/blender_util.h +++ b/intern/cycles/blender/blender_util.h @@ -45,8 +45,8 @@ void python_thread_state_restore(void **python_thread_state); static inline BL::Mesh object_to_mesh(BL::BlendData &data, BL::Object &object, - BL::Depsgraph &depsgraph, - bool calc_undeformed, + BL::Depsgraph & /*depsgraph*/, + bool /*calc_undeformed*/, Mesh::SubdivisionType subdivision_type) { /* TODO: make this work with copy-on-write, modifiers are already evaluated. */ @@ -75,11 +75,11 @@ static inline BL::Mesh object_to_mesh(BL::BlendData &data, * UV are not empty. */ if (mesh.is_editmode() || (mesh.use_auto_smooth() && subdivision_type == Mesh::SUBDIVISION_NONE)) { - mesh = data.meshes.new_from_object(depsgraph, object, false, false); + mesh = data.meshes.new_from_object(object); } } else { - mesh = data.meshes.new_from_object(depsgraph, object, true, calc_undeformed); + mesh = data.meshes.new_from_object(object); } #if 0 |