diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-03-29 16:03:47 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-03-29 16:03:47 +0400 |
commit | e2184c653e1f2cc7e05cf9a42a87d23ea3050eac (patch) | |
tree | dc39ada14e14259a4cd18c2d5974390a585eb7b8 /intern/cycles/render/mesh.cpp | |
parent | 6020d0099039ed18c6a6cd330b68361123c85c1a (diff) |
Cycles: add support for curve deformation motion blur.
Diffstat (limited to 'intern/cycles/render/mesh.cpp')
-rw-r--r-- | intern/cycles/render/mesh.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp index e216630b48c..52cd946456f 100644 --- a/intern/cycles/render/mesh.cpp +++ b/intern/cycles/render/mesh.cpp @@ -199,7 +199,7 @@ void Mesh::compute_bounds() } Attribute *curve_attr = curve_attributes.find(ATTR_STD_MOTION_VERTEX_POSITION); - if (curve_attr) { + if(use_motion_blur && curve_attr) { size_t steps_size = curve_keys.size() * (motion_steps - 1); float3 *key_steps = curve_attr->data_float3(); @@ -225,7 +225,7 @@ void Mesh::compute_bounds() bnds.grow_safe(vert_steps[i]); } - if (curve_attr) { + if (use_motion_blur && curve_attr) { size_t steps_size = curve_keys.size() * (motion_steps - 1); float3 *key_steps = curve_attr->data_float3(); @@ -536,7 +536,9 @@ void Mesh::tag_update(Scene *scene, bool rebuild) bool Mesh::has_motion_blur() const { - return (use_motion_blur && attributes.find(ATTR_STD_MOTION_VERTEX_POSITION)); + return (use_motion_blur && + (attributes.find(ATTR_STD_MOTION_VERTEX_POSITION) || + curve_attributes.find(ATTR_STD_MOTION_VERTEX_POSITION))); } /* Mesh Manager */ |