Revision: 34743
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34743
Author:   nazgul
Date:     2011-02-09 15:38:49 +0000 (Wed, 09 Feb 2011)
Log Message:
-----------
Update mesh normals when undoing sculpt stroke to prevent shading
artifacts in some cases (enter edit mode/disabling modifiers after undo)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/sculpt_undo.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt_undo.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt_undo.c     
2011-02-09 15:32:39 UTC (rev 34742)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt_undo.c     
2011-02-09 15:38:49 UTC (rev 34743)
@@ -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 @@
                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;
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to