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:
parent
30971199ac
commit
3e0f117ef5
Notes:
blender-bot
2023-02-14 08:18:19 +01:00
Referenced by issue #47170, Sculpt mode with Mask modifier enabled result an instant crash
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue