diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-28 12:40:47 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-28 12:40:47 +0400 |
commit | b39a53208319751fb2bfcd9633eb27e748a5897f (patch) | |
tree | e90ffdbb497e77fbcc33cbab8474037e041f7c3b /source/blender/blenkernel/intern | |
parent | 8ebc246a9a0aa33a9586b181a1bfe9ea97329c69 (diff) |
Fix #35513: Multires modifier normal corruption on apply base
Seems it was simply missing mesh normals update in multiresModifier_base_apply.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/multires.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 7bd117ef7ce..c9f3314c573 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -857,6 +857,12 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob) MEM_freeN(origco); cddm->release(cddm); + /* Vertices were moved around, need to update normals after all the vertices are updated + * Probably this is possible to do in the loop above, but this is rather tricky because + * we don't know all needed vertices' coordinates there yet. + */ + BKE_mesh_calc_normals(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL); + /* subdivide the mesh to highest level without displacements */ cddm = CDDM_from_mesh(me, NULL); DM_set_only_copy(cddm, CD_MASK_BAREMESH); |