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
path: root/source
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-01-28 18:34:33 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-01-28 18:34:33 +0300
commitba01ea3f8bee7ea18e2bda07872668ab57d27ca6 (patch)
tree6f62d0a87e1912ad7e9ee33f216b7012c9ef765d /source
parent4a7faaa3999a32efd974af087348389ecdb2cf60 (diff)
parentfd0bc7e002ced8ffd85e9aa3edcae173dbd13392 (diff)
Merge remote-tracking branch 'origin/blender-v2.82-release'
Diffstat (limited to 'source')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc14
1 files changed, 12 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 8ff99816908..b2eb004db27 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -201,6 +201,15 @@ bool check_id_has_anim_component(ID *id)
return (adt->action != nullptr) || (!BLI_listbase_is_empty(&adt->nla_tracks));
}
+bool check_id_has_driver_component(ID *id)
+{
+ AnimData *adt = BKE_animdata_from_id(id);
+ if (adt == nullptr) {
+ return false;
+ }
+ return !BLI_listbase_is_empty(&adt->drivers);
+}
+
OperationCode bone_target_opcode(ID *target,
const char *subtarget,
ID *id,
@@ -2361,8 +2370,9 @@ void DepsgraphRelationBuilder::build_cachefile(CacheFile *cache_file)
/* Animation. */
build_animdata(&cache_file->id);
build_parameters(&cache_file->id);
- if (check_id_has_anim_component(&cache_file->id)) {
- ComponentKey animation_key(&cache_file->id, NodeType::ANIMATION);
+ if (check_id_has_anim_component(&cache_file->id) ||
+ check_id_has_driver_component(&cache_file->id)) {
+ ComponentKey animation_key(&cache_file->id, NodeType::PARAMETERS);
ComponentKey datablock_key(&cache_file->id, NodeType::CACHE);
add_relation(animation_key, datablock_key, "Datablock Animation");
}