Merge branch 'master' into blender2.8
[blender.git] / intern / cycles / blender / blender_session.cpp
index c6a595775071e82b494901b9b11148d2bbba5081..46f32fe816d4bfc45d629876d49f3318fe53e666 100644 (file)
@@ -52,11 +52,13 @@ int BlenderSession::end_resumable_chunk = 0;
 BlenderSession::BlenderSession(BL::RenderEngine& b_engine,
                                BL::UserPreferences& b_userpref,
                                BL::BlendData& b_data,
+                               BL::Depsgraph& b_depsgraph,
                                BL::Scene& b_scene)
 : b_engine(b_engine),
   b_userpref(b_userpref),
   b_data(b_data),
   b_render(b_engine.render()),
+  b_depsgraph(b_depsgraph),
   b_scene(b_scene),
   b_v3d(PointerRNA_NULL),
   b_rv3d(PointerRNA_NULL),
@@ -76,6 +78,7 @@ BlenderSession::BlenderSession(BL::RenderEngine& b_engine,
 BlenderSession::BlenderSession(BL::RenderEngine& b_engine,
                                BL::UserPreferences& b_userpref,
                                BL::BlendData& b_data,
+                               BL::Depsgraph& b_depsgraph,
                                BL::Scene& b_scene,
                                BL::SpaceView3D& b_v3d,
                                BL::RegionView3D& b_rv3d,
@@ -84,6 +87,7 @@ BlenderSession::BlenderSession(BL::RenderEngine& b_engine,
   b_userpref(b_userpref),
   b_data(b_data),
   b_render(b_scene.render()),
+  b_depsgraph(b_depsgraph),
   b_scene(b_scene),
   b_v3d(b_v3d),
   b_rv3d(b_rv3d),
@@ -141,7 +145,7 @@ void BlenderSession::create_session()
        session->set_pause(session_pause);
 
        /* create sync */
-       sync = new BlenderSync(b_engine, b_data, b_scene, scene, !background, session->progress, is_cpu);
+       sync = new BlenderSync(b_engine, b_data, b_depsgraph, b_scene, scene, !background, session->progress, is_cpu);
        BL::Object b_camera_override(b_engine.camera_override());
        if(b_v3d) {
                if(session_pause == false) {
@@ -211,7 +215,7 @@ void BlenderSession::reset_session(BL::BlendData& b_data_, BL::Scene& b_scene_)
        session->stats.mem_peak = session->stats.mem_used;
 
        /* sync object should be re-created */
-       sync = new BlenderSync(b_engine, b_data, b_scene, scene, !background, session->progress, is_cpu);
+       sync = new BlenderSync(b_engine, b_data, b_depsgraph, b_scene, scene, !background, session->progress, is_cpu);
 
        /* for final render we will do full data sync per render layer, only
         * do some basic syncing here, no objects or materials for speed */