diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-09 18:38:49 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-09 18:38:49 +0300 |
commit | ea50e5f5873f471c5f35b4a45330b3a2995e8891 (patch) | |
tree | 97ad9a3c557e678709cd794e2cdf19ecf807b40c /source/blender/editors | |
parent | 97c57abfa32387fab14cb0d575c10c3908131088 (diff) |
Update mesh normals when undoing sculpt stroke to prevent shading
artifacts in some cases (enter edit mode/disabling modifiers after undo)
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index d136fdaf6e0..d88d7a5ac49 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -49,6 +49,7 @@ #include "BKE_multires.h" #include "BKE_paint.h" #include "BKE_key.h" +#include "BKE_mesh.h" #include "WM_api.h" #include "WM_types.h" @@ -184,6 +185,9 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) tag_update= ((Mesh*)ob->data)->id.us > 1; if(ss->modifiers_active) { + Mesh *me= ob->data; + mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL); + sculpt_free_deformMats(ss); tag_update|= 1; } |