Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r--intern/cycles/blender/blender_object.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 0df8939bc18..c8a2f080bba 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -532,7 +532,12 @@ void BlenderSync::sync_motion(BL::SpaceView3D b_v3d, BL::Object b_override)
int frame = b_scene.frame_current();
for(int motion = -1; motion <= 1; motion += 2) {
+ /* we need to set the python thread state again because this
+ * function assumes it is being executed from python and will
+ * try to save the thread state */
+ python_thread_state_restore();
b_scene.frame_set(frame + motion, 0.0f);
+ python_thread_state_save();
/* camera object */
if(b_cam)
@@ -542,7 +547,12 @@ void BlenderSync::sync_motion(BL::SpaceView3D b_v3d, BL::Object b_override)
sync_objects(b_v3d, motion);
}
+ /* we need to set the python thread state again because this
+ * function assumes it is being executed from python and will
+ * try to save the thread state */
+ python_thread_state_restore();
b_scene.frame_set(frame, 0.0f);
+ python_thread_state_save();
/* tag camera for motion update */
if(scene->camera->motion_modified(prevcam))