Fix T40079: cycles crash with objects that have hair motion blur, but no triangle motion.
This commit is contained in:
@@ -346,7 +346,7 @@ void Mesh::add_vertex_normals()
|
|||||||
Attribute *attr_mP = attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
|
Attribute *attr_mP = attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
|
||||||
Attribute *attr_mN = attributes.find(ATTR_STD_MOTION_VERTEX_NORMAL);
|
Attribute *attr_mN = attributes.find(ATTR_STD_MOTION_VERTEX_NORMAL);
|
||||||
|
|
||||||
if(has_motion_blur() && !attr_mN) {
|
if(has_motion_blur() && attr_mP && !attr_mN) {
|
||||||
/* create attribute */
|
/* create attribute */
|
||||||
attr_mN = attributes.add(ATTR_STD_MOTION_VERTEX_NORMAL);
|
attr_mN = attributes.add(ATTR_STD_MOTION_VERTEX_NORMAL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user