Revision: 33674
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33674
Author:   nicholasbishop
Date:     2010-12-15 04:53:56 +0100 (Wed, 15 Dec 2010)

Log Message:
-----------
Fixed bug #23042, Sculpting + Multires + Noise texture tears mesh

Noise texture moved the edges of multires grids different, causing
tears in the mesh. Fixed with a call to re-stitch grids (but only done
if the brush texture is set to noise)

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

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c  2010-12-15 
02:09:35 UTC (rev 33673)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c  2010-12-15 
03:53:56 UTC (rev 33674)
@@ -2584,6 +2584,18 @@
        }
 }
 
+/* noise texture gives different values for the same input coord; this
+   can tear a multires mesh during sculpting so do a stitch in this
+   case */
+static void sculpt_fix_noise_tear(Sculpt *sd, SculptSession *ss)
+{
+       Brush *brush = paint_brush(&sd->paint);
+       MTex *mtex = &brush->mtex;
+
+       if(ss->multires && mtex->tex && mtex->tex->type == TEX_NOISE)
+               multires_stitch_grids(ss->ob);
+}
+
 static void do_symmetrical_brush_actions(Sculpt *sd, SculptSession *ss)
 {
        Brush *brush = paint_brush(&sd->paint);
@@ -2614,6 +2626,9 @@
 
        sculpt_combine_proxies(sd, ss);
 
+       /* hack to fix noise texture tearing mesh */
+       sculpt_fix_noise_tear(sd, ss);
+
        cache->first_time= 0;
 }
 


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

Reply via email to