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.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user