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_util.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_util.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 245186bbc02..1bb38001328 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -59,7 +59,7 @@ void MOD_init_texture(MappingInfoModifierData *dmd, const ModifierEvalContext *ctx) { - Tex *tex = (Tex *)DEG_get_evaluated_id(ctx->depsgraph, &dmd->texture->id); + Tex *tex = dmd->texture; if (tex == NULL) { return; @@ -74,7 +74,7 @@ void MOD_init_texture(MappingInfoModifierData *dmd, const ModifierEvalContext *c /** \param cos: may be NULL, in which case we use directly mesh vertices' coordinates. */ void MOD_get_texture_coords( MappingInfoModifierData *dmd, - const ModifierEvalContext *ctx, + const ModifierEvalContext *UNUSED(ctx), Object *ob, Mesh *mesh, float (*cos)[3], @@ -87,7 +87,7 @@ void MOD_get_texture_coords( if (texmapping == MOD_DISP_MAP_OBJECT) { if (dmd->map_object != NULL) { - Object *map_object = DEG_get_evaluated_object(ctx->depsgraph, dmd->map_object); + Object *map_object = dmd->map_object; invert_m4_m4(mapob_imat, map_object->obmat); } else {/* if there is no map object, default to local */ |