Fix T47170: Sculpt w/ constructive modifier crash
Regression in 4d33c37c9
Only copy normal arrays from sculpt to the DerivedMesh when the mesh is deformed.
Constructive modifiers calculate their own normals.
This commit is contained in:
@@ -343,6 +343,11 @@ static void cdDM_update_normals_from_pbvh(DerivedMesh *dm)
|
||||
CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
|
||||
float (*face_nors)[3];
|
||||
|
||||
/* constructive modifiers handle their own normals */
|
||||
if (!dm->deformedOnly) {
|
||||
return;
|
||||
}
|
||||
|
||||
face_nors = CustomData_get_layer(&dm->polyData, CD_NORMAL);
|
||||
|
||||
BKE_pbvh_update(cddm->pbvh, PBVH_UpdateNormals, face_nors);
|
||||
|
||||
Reference in New Issue
Block a user