Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-04-10 23:00:21 +0300
committerBastien Montagne <bastien@blender.org>2020-04-11 18:16:58 +0300
commit5cc7036aa39506f3af3608ad450f1fdf6b2f3347 (patch)
tree99d6644347b40ec7d3855d9f8fa271dbb8ecc2b1 /source/blender/modifiers/intern/MOD_displace.c
parentb0350d8310f253b01b57a5a46ca982cc787b9478 (diff)
Factorize some common modifiers depsgraph relation update code.
Add a utility to deal with common 'object or posebone transform' case.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_displace.c')
-rw-r--r--source/blender/modifiers/intern/MOD_displace.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index a03167c082f..b074e398ab6 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -135,14 +135,8 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
{
DisplaceModifierData *dmd = (DisplaceModifierData *)md;
if (dmd->map_object != NULL && dmd->texmapping == MOD_DISP_MAP_OBJECT) {
- if (dmd->map_bone[0] && dmd->map_object->type == OB_ARMATURE) {
- DEG_add_object_relation(
- ctx->node, dmd->map_object, DEG_OB_COMP_EVAL_POSE, "Displace Modifier");
- }
- else {
- DEG_add_object_relation(
- ctx->node, dmd->map_object, DEG_OB_COMP_TRANSFORM, "Displace Modifier");
- }
+ MOD_depsgraph_update_object_bone_relation(
+ ctx->node, dmd->map_object, dmd->map_bone, "Displace Modifier");
DEG_add_modifier_to_transform_relation(ctx->node, "Displace Modifier");
}
if (dmd->texmapping == MOD_DISP_MAP_GLOBAL ||