Modifiers: pass the ob->data to the modifier if the mesh param is NULL
This enables the modifiers to access things like vertex groups. Care should be taken to not modifier the mesh itself in this case.
This commit is contained in:
@@ -109,11 +109,11 @@ static void deformVerts(ModifierData *md, const ModifierEvalContext *ctx,
|
||||
int numVerts)
|
||||
{
|
||||
LatticeModifierData *lmd = (LatticeModifierData *) md;
|
||||
|
||||
struct Mesh *mesh_src = mesh ? mesh : ctx->object->data;
|
||||
|
||||
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
|
||||
|
||||
lattice_deform_verts(lmd->object, ctx->object, mesh,
|
||||
lattice_deform_verts(lmd->object, ctx->object, mesh_src,
|
||||
vertexCos, numVerts, lmd->name, lmd->strength);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user