[Bf-blender-cvs] [f709f12d935] master: Fix T89736: Cycles error with persistent data, displacement and motion blur
Brecht Van Lommel
noreply at git.blender.org
Mon Jul 12 15:58:09 CEST 2021
Commit: f709f12d93583d7e476077753241227eb4030954
Author: Brecht Van Lommel
Date: Mon Jul 12 15:56:31 2021 +0200
Branches: master
https://developer.blender.org/rBf709f12d93583d7e476077753241227eb4030954
Fix T89736: Cycles error with persistent data, displacement and motion blur
===================================================================
M intern/cycles/blender/blender_object.cpp
===================================================================
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 635392fb3d4..f5e8db2aee1 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -109,23 +109,23 @@ void BlenderSync::sync_object_motion_init(BL::Object &b_parent, BL::Object &b_ob
}
Geometry *geom = object->get_geometry();
- geom->set_use_motion_blur(false);
- geom->set_motion_steps(0);
- uint motion_steps;
+ int motion_steps = 0;
+ bool use_motion_blur = false;
if (need_motion == Scene::MOTION_BLUR) {
motion_steps = object_motion_steps(b_parent, b_ob, Object::MAX_MOTION_STEPS);
- geom->set_motion_steps(motion_steps);
if (motion_steps && object_use_deform_motion(b_parent, b_ob)) {
- geom->set_use_motion_blur(true);
+ use_motion_blur = true;
}
}
else {
motion_steps = 3;
- geom->set_motion_steps(motion_steps);
}
+ geom->set_use_motion_blur(use_motion_blur);
+ geom->set_motion_steps(motion_steps);
+
motion.resize(motion_steps, transform_empty());
if (motion_steps) {
More information about the Bf-blender-cvs
mailing list