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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-07-12 16:56:31 +0300
committerJeroen Bakker <jeroen@blender.org>2021-07-26 09:40:36 +0300
commit283481643c56af813699bd5167b7b00430284310 (patch)
tree9f7494d56586630dbbe31a9e9cceb3a804a4518c /intern
parent3e6ea470ee73159c2b82895396496a79448dfddc (diff)
Fix T89736: Cycles error with persistent data, displacement and motion blur
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/blender_object.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index dcf6e3cc949..cc21c871993 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) {