diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-03 11:48:29 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-03 11:48:29 +0300 |
commit | 8a7a7af627b89e67b12f9bc4ae9e175c397961ba (patch) | |
tree | c19479b85cdf6ddb21b98de39888a5dad20ccbe2 /source/blender/depsgraph/intern/builder | |
parent | 841346df5d6a8db4d7085ddf9522a823e1b8833d (diff) |
Fix T69326: Parent type ARMATURE doesn't work
Diffstat (limited to 'source/blender/depsgraph/intern/builder')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index dadfe614941..c7b545e9feb 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -812,8 +812,20 @@ void DepsgraphRelationBuilder::build_object_parent(Object *object) switch (object->partype) { /* Armature Deform (Virtual Modifier) */ case PARSKEL: { - ComponentKey parent_key(parent_id, NodeType::TRANSFORM); - add_relation(parent_key, object_transform_key, "Armature Deform Parent"); + ComponentKey parent_transform_key(parent_id, NodeType::TRANSFORM); + add_relation(parent_transform_key, object_transform_key, "Parent Armature Transform"); + + if (parent->type == OB_ARMATURE) { + ComponentKey object_geometry_key(&object->id, NodeType::GEOMETRY); + ComponentKey parent_pose_key(parent_id, NodeType::EVAL_POSE); + add_relation( + parent_transform_key, object_geometry_key, "Parent Armature Transform -> Geometry"); + add_relation(parent_pose_key, object_geometry_key, "Parent Armature Pose -> Geometry"); + + add_depends_on_transform_relation( + &object->id, object_geometry_key, "Virtual Armature Modifier"); + } + break; } |