diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-03-26 13:25:07 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-04-01 15:43:45 +0300 |
commit | 64c8d72ef1ad01dae0ef0a7a78a47d7c83a240d4 (patch) | |
tree | ec85173659b0637ea9dfec8c8e900b46bbe9c808 /source/blender/modifiers/intern/MOD_warp.c | |
parent | a2a571987c6f6a1caee57057cfed18896b786c5b (diff) |
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).
Diffstat (limited to 'source/blender/modifiers/intern/MOD_warp.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_warp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index a4f3dec2f4b..30bd391ef84 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -189,8 +189,8 @@ static void warpModifier_do( invert_m4_m4(obinv, ob->obmat); - mul_m4_m4m4(mat_from, obinv, DEG_get_evaluated_object(ctx->depsgraph, wmd->object_from)->obmat); - mul_m4_m4m4(mat_to, obinv, DEG_get_evaluated_object(ctx->depsgraph, wmd->object_to)->obmat); + mul_m4_m4m4(mat_from, obinv, wmd->object_from->obmat); + mul_m4_m4m4(mat_to, obinv, wmd->object_to->obmat); invert_m4_m4(tmat, mat_from); // swap? mul_m4_m4m4(mat_final, tmat, mat_to); @@ -211,7 +211,7 @@ static void warpModifier_do( } weight = strength; - Tex *tex_target = (Tex *)DEG_get_evaluated_id(ctx->depsgraph, &wmd->texture->id); + Tex *tex_target = wmd->texture; if (mesh != NULL && tex_target != NULL) { tex_co = MEM_malloc_arrayN(numVerts, sizeof(*tex_co), "warpModifier_do tex_co"); MOD_get_texture_coords((MappingInfoModifierData *)wmd, ctx, ob, mesh, vertexCos, tex_co); |