diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-15 14:13:00 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-15 14:13:25 +0300 |
commit | 31731bc834b88ad5d01f2aa3246ab32c058c5d91 (patch) | |
tree | 26b838c03e22a419345d59964dabe23f19a6a0d4 /source/blender/depsgraph | |
parent | b7deea029a2ad80757ab6859c88990d036c5729c (diff) |
Fix T47734: Rest Position is not working with new Deps
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build_nodes.cc | 8 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build_relations.cc | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc index 7457b43fd38..0a5235a6d11 100644 --- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc +++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc @@ -778,6 +778,14 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob) } } + /* Make sure pose is up-to-date with armature updates. */ + add_operation_node(&arm->id, + DEPSNODE_TYPE_PARAMETERS, + DEPSOP_TYPE_EXEC, + NULL, + DEG_OPCODE_PLACEHOLDER, + "Armature Eval"); + /** * Pose Rig Graph * ============== diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc index efeeff27430..226991e7b11 100644 --- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc +++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc @@ -1366,6 +1366,8 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *ob, void DepsgraphRelationBuilder::build_rig(Scene *scene, Object *ob) { /* Armature-Data */ + bArmature *arm = (bArmature *)ob->data; + // TODO: selection status? /* attach links between pose operations */ @@ -1374,6 +1376,13 @@ void DepsgraphRelationBuilder::build_rig(Scene *scene, Object *ob) add_relation(init_key, flush_key, DEPSREL_TYPE_COMPONENT_ORDER, "[Pose Init -> Pose Cleanup]"); + /* Make sure pose is up-to-date with armature updates. */ + OperationKey armature_key(&arm->id, + DEPSNODE_TYPE_PARAMETERS, + DEG_OPCODE_PLACEHOLDER, + "Armature Eval"); + add_relation(armature_key, init_key, DEPSREL_TYPE_COMPONENT_ORDER, "Data dependency"); + if (ob->adt && (ob->adt->action || ob->adt->nla_tracks.first)) { ComponentKey animation_key(&ob->id, DEPSNODE_TYPE_ANIMATION); add_relation(animation_key, init_key, DEPSREL_TYPE_OPERATION, "Rig Animation"); |