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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-11-22 11:38:59 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-11-22 16:02:59 +0300
commit27127bf533428c71e81afbad9947aa232523b7a9 (patch)
tree6987563fd22cf20916405ef2de6a004a62362f9d /source
parent2a38b857f7dc33150ff44ffda3366dbb197d5425 (diff)
Depsgraph: Ignore action time dependency if it's not needed
It is possible to have action which is not nullptr but which have no f-curves in it (for example, animate cube's location, then delete all f-curves). Such situation should not add time dependency as it could slow down scene evaluation on frame change.
Diffstat (limited to 'source')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index db7c1e5ceae..3e0ab9684da 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1403,9 +1403,11 @@ void DepsgraphRelationBuilder::build_action(bAction *action)
if (built_map_.checkIsBuiltAndTag(action)) {
return;
}
- TimeSourceKey time_src_key;
- ComponentKey animation_key(&action->id, NodeType::ANIMATION);
- add_relation(time_src_key, animation_key, "TimeSrc -> Animation");
+ if (!BLI_listbase_is_empty(&action->curves)) {
+ TimeSourceKey time_src_key;
+ ComponentKey animation_key(&action->id, NodeType::ANIMATION);
+ add_relation(time_src_key, animation_key, "TimeSrc -> Animation");
+ }
}
void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)