From a57fec986d2d7093fc8148188315274e4f150857 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 28 Apr 2019 20:04:55 +0300 Subject: Depsgraph: fix dependencies for drivers and animation on Bone properties. The driver code was almost there, but didn't work because ID nodes have no outlinks - and using links won't be safe anyway because of ordering issues. Instead, just loop over all IDNodes. Animation is fixed simply by referring to ARMATURE_EVAL instead of BONE in construct_node_identifier - the bArmature ID doesn't have BONE components in any case, so the old identifier can't work. --- source/blender/depsgraph/intern/builder/deg_builder_rna.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source/blender/depsgraph/intern/builder/deg_builder_rna.cc') diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc index 810d3ee3f66..27899abc972 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc @@ -202,12 +202,11 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(const PointerRNA *ptr, return node_identifier; } else if (ptr->type == &RNA_Bone) { - const Bone *bone = static_cast(ptr->data); - /* Armature-level bone, but it ends up going to bone component - * anyway. */ - // NOTE: the ID in this case will end up being bArmature. - node_identifier.type = NodeType::BONE; - node_identifier.component_name = bone->name; + /* Armature-level bone mapped to Armature Eval, and thus Pose Init. + * Drivers have special code elsewhere that links them to the pose + * bone components, instead of using this generic code. */ + node_identifier.type = NodeType::PARAMETERS; + node_identifier.operation_code = OperationCode::ARMATURE_EVAL; return node_identifier; } else if (RNA_struct_is_a(ptr->type, &RNA_Constraint)) { -- cgit v1.2.3