diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_shrinkwrap.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_shrinkwrap.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c index 1ca8d573e8f..1e5f78bdbce 100644 --- a/source/blender/modifiers/intern/MOD_shrinkwrap.c +++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c @@ -103,40 +103,39 @@ static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, walk(userData, ob, &smd->auxTarget, IDWALK_CB_NOP); } -static void deformVerts(ModifierData *md, struct Depsgraph *UNUSED(depsgraph), - Object *ob, DerivedMesh *derivedData, +static void deformVerts(ModifierData *md, const ModifierEvalContext *ctx, + DerivedMesh *derivedData, float (*vertexCos)[3], - int numVerts, - ModifierApplyFlag flag) + int numVerts) { DerivedMesh *dm = derivedData; - CustomDataMask dataMask = requiredDataMask(ob, md); - bool forRender = (flag & MOD_APPLY_RENDER) != 0; + CustomDataMask dataMask = requiredDataMask(ctx->object, md); + bool forRender = (ctx->flag & MOD_APPLY_RENDER) != 0; /* ensure we get a CDDM with applied vertex coords */ if (dataMask) { - dm = get_cddm(ob, NULL, dm, vertexCos, dependsOnNormals(md)); + dm = get_cddm(ctx->object, NULL, dm, vertexCos, dependsOnNormals(md)); } - shrinkwrapModifier_deform((ShrinkwrapModifierData *)md, ob, dm, vertexCos, numVerts, forRender); + shrinkwrapModifier_deform((ShrinkwrapModifierData *)md, ctx->object, dm, vertexCos, numVerts, forRender); if (dm != derivedData) dm->release(dm); } -static void deformVertsEM(ModifierData *md, struct Depsgraph *UNUSED(depsgraph), Object *ob, +static void deformVertsEM(ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *editData, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts) { DerivedMesh *dm = derivedData; - CustomDataMask dataMask = requiredDataMask(ob, md); + CustomDataMask dataMask = requiredDataMask(ctx->object, md); /* ensure we get a CDDM with applied vertex coords */ if (dataMask) { - dm = get_cddm(ob, editData, dm, vertexCos, dependsOnNormals(md)); + dm = get_cddm(ctx->object, editData, dm, vertexCos, dependsOnNormals(md)); } - shrinkwrapModifier_deform((ShrinkwrapModifierData *)md, ob, dm, vertexCos, numVerts, false); + shrinkwrapModifier_deform((ShrinkwrapModifierData *)md, ctx->object, dm, vertexCos, numVerts, false); if (dm != derivedData) dm->release(dm); |