diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_uvwarp.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_uvwarp.c | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/source/blender/modifiers/intern/MOD_uvwarp.c b/source/blender/modifiers/intern/MOD_uvwarp.c index b3fc3842635..b24ea55696e 100644 --- a/source/blender/modifiers/intern/MOD_uvwarp.c +++ b/source/blender/modifiers/intern/MOD_uvwarp.c @@ -40,8 +40,6 @@ #include "BKE_library_query.h" #include "BKE_modifier.h" -#include "depsgraph_private.h" - #include "MOD_util.h" @@ -145,8 +143,8 @@ static void uv_warp_compute(void *userdata, const int i) } } -static DerivedMesh *applyModifier(ModifierData *md, Object *ob, - DerivedMesh *dm, +static DerivedMesh *applyModifier(ModifierData *md, struct EvaluationContext *UNUSED(eval_ctx), + Object *ob, DerivedMesh *dm, ModifierApplyFlag UNUSED(flag)) { UVWarpModifierData *umd = (UVWarpModifierData *) md; @@ -225,34 +223,9 @@ static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, walk(userData, ob, &umd->object_src, IDWALK_CB_NOP); } -static void uv_warp_deps_object_bone(DagForest *forest, DagNode *obNode, - Object *obj, const char *bonename) -{ - if (obj) { - DagNode *curNode = dag_get_node(forest, obj); - - if (bonename[0]) - dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA | DAG_RL_DATA_DATA, "UVWarp Modifier"); - else - dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA, "UVWarp Modifier"); - } -} - -static void updateDepgraph(ModifierData *md, DagForest *forest, - struct Main *UNUSED(bmain), - struct Scene *UNUSED(scene), - Object *UNUSED(ob), - DagNode *obNode) -{ - UVWarpModifierData *umd = (UVWarpModifierData *) md; - - uv_warp_deps_object_bone(forest, obNode, umd->object_src, umd->bone_src); - uv_warp_deps_object_bone(forest, obNode, umd->object_dst, umd->bone_dst); -} - -static void uv_warp_deps_object_bone_new(struct DepsNodeHandle *node, - Object *object, - const char *bonename) +static void uv_warp_deps_object_bone(struct DepsNodeHandle *node, + Object *object, + const char *bonename) { if (object != NULL) { if (bonename[0]) @@ -270,8 +243,8 @@ static void updateDepsgraph(ModifierData *md, { UVWarpModifierData *umd = (UVWarpModifierData *) md; - uv_warp_deps_object_bone_new(node, umd->object_src, umd->bone_src); - uv_warp_deps_object_bone_new(node, umd->object_dst, umd->bone_dst); + uv_warp_deps_object_bone(node, umd->object_src, umd->bone_src); + uv_warp_deps_object_bone(node, umd->object_dst, umd->bone_dst); } ModifierTypeInfo modifierType_UVWarp = { @@ -293,7 +266,6 @@ ModifierTypeInfo modifierType_UVWarp = { /* requiredDataMask */ requiredDataMask, /* freeData */ NULL, /* isDisabled */ NULL, - /* updateDepgraph */ updateDepgraph, /* updateDepsgraph */ updateDepsgraph, /* dependsOnTime */ NULL, /* dependsOnNormals */ NULL, |