Commit: 839a6b22d6c3750b0c8a98ccdb50d57e475ec754 Author: Antony Riakiotakis Date: Wed Feb 18 17:58:57 2015 +0100 Branches: master https://developer.blender.org/rB839a6b22d6c3750b0c8a98ccdb50d57e475ec754
Fix T43716 regression in mask modifier - edges could access out of bounds indices of vertices. Issue here is that if we copy edge customdata the MEdge data that were previously written get overwritten, solution is to write indices and flags last (probably writing flags is superfluous here). =================================================================== M source/blender/modifiers/intern/MOD_mask.c =================================================================== diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c index 59348c5..c1d4e41 100644 --- a/source/blender/modifiers/intern/MOD_mask.c +++ b/source/blender/modifiers/intern/MOD_mask.c @@ -293,7 +293,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, mloop_dst = CDDM_get_loops(result); medge_dst = CDDM_get_edges(result); mvert_dst = CDDM_get_verts(result); - + /* using ghash-iterators, map data into new mesh */ /* vertices */ GHASH_ITER (gh_iter, vertHash) { @@ -318,12 +318,11 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, e_src = &medge_src[i_src]; e_dst = &medge_dst[i_dst]; - + + DM_copy_edge_data(dm, result, i_src, i_dst, 1); *e_dst = *e_src; e_dst->v1 = GET_UINT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_UINT_IN_POINTER(e_src->v1))); e_dst->v2 = GET_UINT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_UINT_IN_POINTER(e_src->v2))); - - DM_copy_edge_data(dm, result, i_src, i_dst, 1); } /* faces */ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs