forked from bartvdbraak/blender
Fix T50634: Hair Primitive as Triangles + Hair shader with a texture = crash
Attributes were not resized after pushing new triangles to the mesh.
This commit is contained in:
parent
209a64111e
commit
f1b21d5960
@ -411,6 +411,7 @@ static void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData,
|
||||
}
|
||||
}
|
||||
|
||||
mesh->resize_mesh(mesh->verts.size(), mesh->triangles.size());
|
||||
mesh->attributes.remove(ATTR_STD_VERTEX_NORMAL);
|
||||
mesh->attributes.remove(ATTR_STD_FACE_NORMAL);
|
||||
mesh->add_face_normals();
|
||||
@ -545,6 +546,7 @@ static void ExportCurveTriangleGeometry(Mesh *mesh,
|
||||
}
|
||||
}
|
||||
|
||||
mesh->resize_mesh(mesh->verts.size(), mesh->triangles.size());
|
||||
mesh->attributes.remove(ATTR_STD_VERTEX_NORMAL);
|
||||
mesh->attributes.remove(ATTR_STD_FACE_NORMAL);
|
||||
mesh->add_face_normals();
|
||||
|
Loading…
Reference in New Issue
Block a user