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_relations.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc13
1 files changed, 11 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 558ea3dd6e0..51eefd7e31d 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1729,8 +1729,17 @@ void DepsgraphRelationBuilder::build_driver_id_property(ID *id, const char *rna_
return;
}
const char *prop_identifier = RNA_property_identifier((PropertyRNA *)prop);
- OperationKey id_property_key(
- id, NodeType::PARAMETERS, OperationCode::ID_PROPERTY, prop_identifier);
+ /* Custom properties of bones are placed in their components to improve granularity. */
+ OperationKey id_property_key;
+ if (RNA_struct_is_a(ptr.type, &RNA_PoseBone)) {
+ const bPoseChannel *pchan = static_cast<const bPoseChannel *>(ptr.data);
+ id_property_key = OperationKey(
+ id, NodeType::BONE, pchan->name, OperationCode::ID_PROPERTY, prop_identifier);
+ }
+ else {
+ id_property_key = OperationKey(
+ id, NodeType::PARAMETERS, OperationCode::ID_PROPERTY, prop_identifier);
+ }
OperationKey parameters_exit_key(id, NodeType::PARAMETERS, OperationCode::PARAMETERS_EXIT);
add_relation(
id_property_key, parameters_exit_key, "ID Property -> Done", RELATION_CHECK_BEFORE_ADD);