diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-07-11 13:15:20 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-07-11 13:15:20 +0400 |
commit | 9fb2e5dde70bd971dabfdf3b1099d92241dc96ed (patch) | |
tree | a9948718d7d0e49f598c2bbb8c2c704e288a46c6 /source/blender/modifiers/intern/MOD_simpledeform.c | |
parent | 7dfe34864e019fe08fbdfa62d4dacf158a0602bf (diff) |
Fix #27930: many modifiers crashed when used on a lattice with a vertex group.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_simpledeform.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_simpledeform.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c index ea4771b679a..5efd6cd28ec 100644 --- a/source/blender/modifiers/intern/MOD_simpledeform.c +++ b/source/blender/modifiers/intern/MOD_simpledeform.c @@ -162,8 +162,8 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object float smd_limit[2], smd_factor; SpaceTransform *transf = NULL, tmp_transf; void (*simpleDeform_callback)(const float factor, const float dcut[3], float *co) = NULL; //Mode callback - int vgroup = defgroup_name_index(ob, smd->vgroup_name); - MDeformVert *dvert = NULL; + int vgroup; + MDeformVert *dvert; //Safe-check if(smd->origin == ob) smd->origin = NULL; //No self references @@ -216,17 +216,7 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object smd_factor = smd->factor / MAX2(FLT_EPSILON, smd_limit[1]-smd_limit[0]); } - - if(dm) - { - dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT); - } - else if(ob->type == OB_LATTICE) - { - dvert = lattice_get_deform_verts(ob); - } - - + modifier_get_vgroup(ob, dm, smd->vgroup_name, &dvert, &vgroup); switch(smd->mode) { |