diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-14 16:20:47 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-14 16:20:47 +0300 |
commit | f922d5d454593258586eae1c5390e913e0fa044d (patch) | |
tree | 15506e0392a5b66191c2a77c4af008600941f4da /source/blender/editors/sculpt_paint | |
parent | d612fdcdec006ea6229b0731f58e884c8e2cc4df (diff) |
Fix #20376: crash with layer sculpt and multires. This is not working
yet, at least prevents the crash for now.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 8b705ff5b5e..0dd41fb559a 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1104,7 +1104,7 @@ static void do_layer_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, int int n; /* XXX not working yet for multires */ - if(!ss->mvert) + if(ss->multires) return; if(ss->cache->flip) @@ -1683,7 +1683,7 @@ static void sculpt_update_cache_invariants(Sculpt *sd, SculptSession *ss, bConte view3d_get_transformation(vc->ar, vc->rv3d, vc->obact, cache->mats); /* Initialize layer brush displacements and persistent coords */ - if(brush->sculpt_tool == SCULPT_TOOL_LAYER) { + if(brush->sculpt_tool == SCULPT_TOOL_LAYER && !ss->multires) { if(!ss->layer_disps || !(brush->flag & BRUSH_PERSISTENT)) { if(ss->layer_disps) MEM_freeN(ss->layer_disps); @@ -1958,7 +1958,7 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss) copy_v3_v3(fn, cache->face_norms[i]); } - if(brush->sculpt_tool == SCULPT_TOOL_LAYER) + if(brush->sculpt_tool == SCULPT_TOOL_LAYER && !ss->multires) memset(ss->layer_disps, 0, sizeof(float) * ss->totvert); } } |