diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-08 13:34:01 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-08 13:34:06 +0300 |
commit | 002dcd200178c602474c3794c3c21e3b212e6e25 (patch) | |
tree | 2b7207c615fef56063e93d70a7248df9ade5d6a7 /source/blender/modifiers/intern/MOD_lattice.c | |
parent | 9a79178c2eb79e724077d38cd2dd964d0b6ca0ea (diff) |
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.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_lattice.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_lattice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c index 84e7e41efcb..69c814279be 100644 --- a/source/blender/modifiers/intern/MOD_lattice.c +++ b/source/blender/modifiers/intern/MOD_lattice.c @@ -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); } |