Fix T47734: Rest Position is not working with new Deps

This commit is contained in:
Sergey Sharybin 2016-03-15 16:13:00 +05:00
parent b7deea029a
commit 31731bc834
Notes: blender-bot 2023-02-14 08:07:44 +01:00
Referenced by issue #47806, Blender animation player stop working correctly with XVID codec
Referenced by issue #47734, Rest Position is not working with new Deps
2 changed files with 17 additions and 0 deletions

View File

@ -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
* ==============

View File

@ -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");