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:
authorAlexander Gavrilov <angavrilov@gmail.com>2016-08-07 22:41:35 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2016-08-07 22:45:28 +0300
commitaa30f993d2519e6e5aadbc77202e65086ecde565 (patch)
treedc807318671f1d8fe72fb45df059f0f02f7e9957 /intern/cycles/blender/blender_object.cpp
parente635f0413d85ccf636d6abbfc3ed708fb7d68390 (diff)
Cycles: fix objects disappearing when starting or stopping movement.
Another issue with the modified particle motion blur fix: since pre and post are used as validity markers, they must be set even if there is no actual motion, like the original bool flags were. Otherwise an object starting to move or stopping is interpreted as having invalid blur data and hidden.
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r--intern/cycles/blender/blender_object.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index c34dec3be51..f305e8e17cc 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -329,16 +329,18 @@ Object *BlenderSync::sync_object(BL::Object& b_parent,
/* object transformation */
if(tfm != object->tfm) {
VLOG(1) << "Object " << b_ob.name() << " motion detected.";
- if(motion_time == -1.0f) {
- object->motion.pre = tfm;
- object->use_motion = true;
- }
- else if(motion_time == 1.0f) {
- object->motion.post = tfm;
+ if(motion_time == -1.0f || motion_time == 1.0f) {
object->use_motion = true;
}
}
+ if(motion_time == -1.0f) {
+ object->motion.pre = tfm;
+ }
+ else if(motion_time == 1.0f) {
+ object->motion.post = tfm;
+ }
+
/* mesh deformation */
if(object->mesh)
sync_mesh_motion(b_ob, object, motion_time);