From 07ff9e92bbcb6c293cffba9c9428926f6fa72160 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 12 Feb 2019 12:01:17 +0100 Subject: Depsgraph: Add utility function for transform dependency This is what modifiers are to use to indicate that they depend on a transformation of the object itself. Currently should be no functional changes, but in the future this will allow to easily change transform operation depending on whether there is a simulation associated with the object. --- source/blender/modifiers/intern/MOD_weightvgedit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_weightvgedit.c') diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index e7a360ff4fe..b681cbec865 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -133,10 +133,10 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte WeightVGEditModifierData *wmd = (WeightVGEditModifierData *)md; if (wmd->mask_tex_map_obj != NULL && wmd->mask_tex_mapping == MOD_DISP_MAP_OBJECT) { DEG_add_object_relation(ctx->node, wmd->mask_tex_map_obj, DEG_OB_COMP_TRANSFORM, "WeightVGEdit Modifier"); - DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_TRANSFORM, "WeightVGEdit Modifier"); + DEG_add_modifier_to_transform_relation(ctx->node, "WeightVGEdit Modifier"); } else if (wmd->mask_tex_mapping == MOD_DISP_MAP_GLOBAL) { - DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_TRANSFORM, "WeightVGEdit Modifier"); + DEG_add_modifier_to_transform_relation(ctx->node, "WeightVGEdit Modifier"); } if (wmd->mask_texture != NULL) { DEG_add_generic_id_relation(ctx->node, &wmd->mask_texture->id, "WeightVGEdit Modifier"); -- cgit v1.2.3