diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2010-12-15 06:53:56 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2010-12-15 06:53:56 +0300 |
commit | ff6e631c86aa934da09db03e9505d5b060007fac (patch) | |
tree | e94a74bd5411433e2a2594a57cb2c71cb489c2f4 /source/blender/editors/sculpt_paint | |
parent | 32e6f862e9ec670d675487958ecae85b86fd526d (diff) |
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)
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 15 |
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; } |