diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-08-06 01:38:23 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-08-06 02:14:32 +0300 |
commit | 734e0aca3872410dcaaf351e091a49a8d6186de2 (patch) | |
tree | 819600124a54dc38a9daebfa88b39bc020e80a28 /intern/cycles/render/object.cpp | |
parent | df7be614382ba6ce58a2fab4ff6b4ab0b09b0a9f (diff) |
Fix for Cycles particle motion blur hiding fix.
My mistake in modifying the patch.
Diffstat (limited to 'intern/cycles/render/object.cpp')
-rw-r--r-- | intern/cycles/render/object.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp index 7024a8bcc79..5dbe2e4d6a1 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; |