[Bf-blender-cvs] [52fda9b] master: Fix T45019: Cycles wrong render of motion blur mesh
Sergey Sharybin
noreply at git.blender.org
Fri Sep 4 12:22:14 CEST 2015
Commit: 52fda9b0dbdc561f905cd691532e361a0254113a
Author: Sergey Sharybin
Date: Fri Sep 4 15:19:22 2015 +0500
Branches: master
https://developer.blender.org/rB52fda9b0dbdc561f905cd691532e361a0254113a
Fix T45019: Cycles wrong render of motion blur mesh
The issue was caused by wrong detection whether number of verticies
changed or not. Basically, it wasn't working correct in cases when
number of verticies is increasing compared to the current frame.
===================================================================
M intern/cycles/blender/blender_mesh.cpp
===================================================================
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index e81170a..7135e93 100644
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@ -842,6 +842,7 @@ void BlenderSync::sync_mesh_motion(BL::Object b_ob, Object *object, float motion
return;
}
+ /* TODO(sergey): Perform preliminary check for number of verticies. */
if(numverts) {
/* find attributes */
Attribute *attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
@@ -873,7 +874,9 @@ void BlenderSync::sync_mesh_motion(BL::Object b_ob, Object *object, float motion
/* in case of new attribute, we verify if there really was any motion */
if(new_attribute) {
- if(i != numverts || memcmp(mP, &mesh->verts[0], sizeof(float3)*numverts) == 0) {
+ if(b_mesh.vertices.length() != numverts ||
+ memcmp(mP, &mesh->verts[0], sizeof(float3)*numverts) == 0)
+ {
/* no motion, remove attributes again */
VLOG(1) << "No actual deformation motion for object " << b_ob.name();
mesh->attributes.remove(ATTR_STD_MOTION_VERTEX_POSITION);
More information about the Bf-blender-cvs
mailing list