[Bf-blender-cvs] [aa30f99] master: Cycles: fix objects disappearing when starting or stopping movement.

Alexander Gavrilov noreply at git.blender.org
Sun Aug 7 21:46:55 CEST 2016


Commit: aa30f993d2519e6e5aadbc77202e65086ecde565
Author: Alexander Gavrilov
Date:   Sun Aug 7 22:41:35 2016 +0300
Branches: master
https://developer.blender.org/rBaa30f993d2519e6e5aadbc77202e65086ecde565

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.

===================================================================

M	intern/cycles/blender/blender_object.cpp

===================================================================

diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index c34dec3..f305e8e 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);




More information about the Bf-blender-cvs mailing list