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:
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_rna.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_rna.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
index 1238cdc70c6..ea5f86a31a8 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc
@@ -211,6 +211,12 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(const PointerRNA *ptr,
* bone components, instead of using this generic code. */
node_identifier.type = NodeType::PARAMETERS;
node_identifier.operation_code = OperationCode::ARMATURE_EVAL;
+ /* If trying to look up via an Object, e.g. due to lookup via
+ * obj.pose.bones[].bone in a driver attached to the Object,
+ * redirect to its data. */
+ if (GS(node_identifier.id->name) == ID_OB) {
+ node_identifier.id = (ID *)((Object *)node_identifier.id)->data;
+ }
return node_identifier;
}
else if (RNA_struct_is_a(ptr->type, &RNA_Constraint)) {