Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_hook.c')
-rw-r--r--source/blender/modifiers/intern/MOD_hook.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index 195eb066a9b..7e7d43cdf20 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -352,32 +352,31 @@ static void deformVerts_do(HookModifierData *hmd, Object *ob, DerivedMesh *dm,
}
}
-static void deformVerts(ModifierData *md, struct Depsgraph *UNUSED(depsgraph), Object *ob, DerivedMesh *derivedData,
- float (*vertexCos)[3], int numVerts,
- ModifierApplyFlag UNUSED(flag))
+static void deformVerts(ModifierData *md, const ModifierEvalContext *ctx, DerivedMesh *derivedData,
+ float (*vertexCos)[3], int numVerts)
{
HookModifierData *hmd = (HookModifierData *) md;
DerivedMesh *dm = derivedData;
/* We need a valid dm for meshes when a vgroup is set... */
- if (!dm && ob->type == OB_MESH && hmd->name[0] != '\0')
- dm = get_dm(ob, NULL, dm, NULL, false, false);
+ if (!dm && ctx->object->type == OB_MESH && hmd->name[0] != '\0')
+ dm = get_dm(ctx->object, NULL, dm, NULL, false, false);
- deformVerts_do(hmd, ob, dm, vertexCos, numVerts);
+ deformVerts_do(hmd, ctx->object, dm, vertexCos, numVerts);
if (derivedData != dm)
dm->release(dm);
}
-static void deformVertsEM(ModifierData *md, struct Depsgraph *UNUSED(depsgraph), Object *ob, struct BMEditMesh *editData,
+static void deformVertsEM(ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *editData,
DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
HookModifierData *hmd = (HookModifierData *) md;
DerivedMesh *dm = derivedData;
/* We need a valid dm for meshes when a vgroup is set... */
- if (!dm && ob->type == OB_MESH && hmd->name[0] != '\0')
- dm = get_dm(ob, editData, dm, NULL, false, false);
+ if (!dm && ctx->object->type == OB_MESH && hmd->name[0] != '\0')
+ dm = get_dm(ctx->object, editData, dm, NULL, false, false);
- deformVerts_do(hmd, ob, dm, vertexCos, numVerts);
+ deformVerts_do(hmd, ctx->object, dm, vertexCos, numVerts);
if (derivedData != dm)
dm->release(dm);