diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvgmix.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvgmix.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index 266cfcc59a6..3d60c4a8b8b 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -43,6 +43,8 @@ #include "BKE_texture.h" /* Texture masking. */ #include "depsgraph_private.h" +#include "DEG_depsgraph_build.h" + #include "MEM_guardedalloc.h" #include "MOD_weightvg_util.h" @@ -211,6 +213,21 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, "WeightVGMix Modifier"); } +static void updateDepsgraph(ModifierData *md, + struct Main *UNUSED(bmain), + struct Scene *UNUSED(scene), + Object *ob, + struct DepsNodeHandle *node) +{ + WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md; + if (wmd->mask_tex_map_obj != NULL && wmd->mask_tex_mapping == MOD_DISP_MAP_OBJECT) { + DEG_add_object_relation(node, wmd->mask_tex_map_obj, DEG_OB_COMP_TRANSFORM, "WeightVGMix Modifier"); + } + if (wmd->mask_tex_mapping == MOD_DISP_MAP_GLOBAL) { + DEG_add_object_relation(node, ob, DEG_OB_COMP_TRANSFORM, "WeightVGMix Modifier"); + } +} + static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) { WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md; @@ -422,6 +439,7 @@ ModifierTypeInfo modifierType_WeightVGMix = { /* freeData */ freeData, /* isDisabled */ isDisabled, /* updateDepgraph */ updateDepgraph, + /* updateDepsgraph */ updateDepsgraph, /* dependsOnTime */ dependsOnTime, /* dependsOnNormals */ NULL, /* foreachObjectLink */ foreachObjectLink, |