[Bf-blender-cvs] [1012569dfa3] blender-v2.83-release: Fix T77683: Cycles baking crash with motion blur enabled and no camera specified

Philipp Oeser noreply at git.blender.org
Wed Aug 26 11:57:24 CEST 2020


Commit: 1012569dfa34af159a7b8262699e3e4fdcc07085
Author: Philipp Oeser
Date:   Mon Aug 17 14:20:37 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB1012569dfa34af159a7b8262699e3e4fdcc07085

Fix T77683: Cycles baking crash with motion blur enabled and no camera
specified

Maniphest Tasks: T77683

Differential Revision: https://developer.blender.org/D8593

===================================================================

M	intern/cycles/blender/blender_object.cpp

===================================================================

diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index a461982a538..fca2d0baa1c 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -456,15 +456,19 @@ void BlenderSync::sync_motion(BL::RenderSettings &b_render,
     python_thread_state_restore(python_thread_state);
     b_engine.frame_set(frame, subframe);
     python_thread_state_save(python_thread_state);
-    sync_camera_motion(b_render, b_cam, width, height, 0.0f);
+    if (b_cam) {
+      sync_camera_motion(b_render, b_cam, width, height, 0.0f);
+    }
     sync_objects(b_depsgraph, b_v3d, 0.0f);
   }
 
   /* Insert motion times from camera. Motion times from other objects
    * have already been added in a sync_objects call. */
-  uint camera_motion_steps = object_motion_steps(b_cam, b_cam);
-  for (size_t step = 0; step < camera_motion_steps; step++) {
-    motion_times.insert(scene->camera->motion_time(step));
+  if (b_cam) {
+    uint camera_motion_steps = object_motion_steps(b_cam, b_cam);
+    for (size_t step = 0; step < camera_motion_steps; step++) {
+      motion_times.insert(scene->camera->motion_time(step));
+    }
   }
 
   /* note iteration over motion_times set happens in sorted order */



More information about the Bf-blender-cvs mailing list