Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-01-14 02:04:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-01-14 02:08:29 +0300
commit3e0f117ef574e1bbab5793db6cfe3fc8bd0fdce9 (patch)
tree2d5e3857d481c74223dbf633076172b99edbfdc7 /source
parent30971199aced817a1fa089e6fdeefe0c345e4c48 (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 24b79c1e566..eacacddb333 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -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);