From 64c8d72ef1ad01dae0ef0a7a78a47d7c83a240d4 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 26 Mar 2019 11:25:07 +0100 Subject: Modifiers: Use object passed to evaluation This was wrong and violating design to force modifiers to query evaluated objects and IDs. It is up to the caller to make sure the object is properly evaluatable. Effectively, reverting changes from de491abf9962 (and possibly other related changes). --- source/blender/modifiers/intern/MOD_cast.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_cast.c') diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index ec0aa4361f4..b8917f58234 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -95,7 +95,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte } static void sphere_do( - CastModifierData *cmd, const ModifierEvalContext *ctx, + CastModifierData *cmd, const ModifierEvalContext *UNUSED(ctx), Object *ob, Mesh *mesh, float (*vertexCos)[3], int numVerts) { @@ -119,7 +119,7 @@ static void sphere_do( if (type == MOD_CAST_TYPE_CYLINDER) flag &= ~MOD_CAST_Z; - ctrl_ob = DEG_get_evaluated_object(ctx->depsgraph, cmd->object); + ctrl_ob = cmd->object; /* spherify's center is {0, 0, 0} (the ob's own center in its local * space), by default, but if the user defined a control object, @@ -217,7 +217,7 @@ static void sphere_do( } static void cuboid_do( - CastModifierData *cmd, const ModifierEvalContext *ctx, + CastModifierData *cmd, const ModifierEvalContext *UNUSED(ctx), Object *ob, Mesh *mesh, float (*vertexCos)[3], int numVerts) { @@ -236,7 +236,7 @@ static void cuboid_do( flag = cmd->flag; - ctrl_ob = DEG_get_evaluated_object(ctx->depsgraph, cmd->object); + ctrl_ob = cmd->object; /* now we check which options the user wants */ -- cgit v1.2.3