[Bf-blender-cvs] [734e0ac] master: Fix for Cycles particle motion blur hiding fix.
Brecht Van Lommel
noreply at git.blender.org
Sat Aug 6 01:15:11 CEST 2016
Commit: 734e0aca3872410dcaaf351e091a49a8d6186de2
Author: Brecht Van Lommel
Date: Sat Aug 6 00:38:23 2016 +0200
Branches: master
https://developer.blender.org/rB734e0aca3872410dcaaf351e091a49a8d6186de2
Fix for Cycles particle motion blur hiding fix.
My mistake in modifying the patch.
===================================================================
M intern/cycles/render/object.cpp
===================================================================
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 7024a8b..5dbe2e4 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -55,9 +55,9 @@ Object::Object()
particle_system = NULL;
particle_index = 0;
bounds = BoundBox::empty;
- motion.pre = transform_identity();
- motion.mid = transform_identity();
- motion.post = transform_identity();
+ motion.pre = transform_empty();
+ motion.mid = transform_empty();
+ motion.post = transform_empty();
use_motion = false;
}
@@ -346,6 +346,15 @@ void ObjectManager::device_update_object_transform(UpdateObejctTransformState *s
Transform mtfm_pre = ob->motion.pre;
Transform mtfm_post = ob->motion.post;
+ /* In case of missing motion information for previous/next frame,
+ * assume there is no motion. */
+ if(!ob->use_motion || mtfm_pre == transform_empty()) {
+ mtfm_pre = ob->tfm;
+ }
+ if(!ob->use_motion || mtfm_post == transform_empty()) {
+ mtfm_post = ob->tfm;
+ }
+
if(!mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION)) {
mtfm_pre = mtfm_pre * itfm;
mtfm_post = mtfm_post * itfm;
More information about the Bf-blender-cvs
mailing list