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
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index dc805a9ef0e..f29d32131d6 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2584,6 +2584,18 @@ static void do_radial_symmetry(Sculpt *sd, SculptSession *ss, Brush *brush, cons
}
}
+/* 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 @@ static void do_symmetrical_brush_actions(Sculpt *sd, SculptSession *ss)
sculpt_combine_proxies(sd, ss);
+ /* hack to fix noise texture tearing mesh */
+ sculpt_fix_noise_tear(sd, ss);
+
cache->first_time= 0;
}