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_util.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_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_util.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index 912b4a871a6..f6b7c829c13 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -262,6 +262,22 @@ void MOD_get_vgroup(
}
}
+void MOD_depsgraph_update_object_bone_relation(struct DepsNodeHandle *node,
+ Object *object,
+ const char *bonename,
+ const char *description)
+{
+ if (object == NULL) {
+ return;
+ }
+ if (bonename[0] != '\0' && object->type == OB_ARMATURE) {
+ DEG_add_object_relation(node, object, DEG_OB_COMP_EVAL_POSE, description);
+ }
+ else {
+ DEG_add_object_relation(node, object, DEG_OB_COMP_TRANSFORM, description);
+ }
+}
+
/* only called by BKE_modifier.h/modifier.c */
void modifier_type_init(ModifierTypeInfo *types[])
{