[Bf-blender-cvs] [27127bf5334] master: Depsgraph: Ignore action time dependency if it's not needed
Sergey Sharybin
noreply at git.blender.org
Fri Nov 22 14:03:07 CET 2019
Commit: 27127bf533428c71e81afbad9947aa232523b7a9
Author: Sergey Sharybin
Date: Fri Nov 22 09:38:59 2019 +0100
Branches: master
https://developer.blender.org/rB27127bf533428c71e81afbad9947aa232523b7a9
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.
===================================================================
M source/blender/depsgraph/intern/builder/deg_builder_relations.cc
===================================================================
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)
More information about the Bf-blender-cvs
mailing list