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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-05-04 17:36:27 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-05-04 17:37:21 +0300
commiteccbca9e7ddf826aab2e0a8566735b27ea3bbe37 (patch)
tree1fe6a46b93ebd827126e13bf7142eb68a5ba5df2 /source/blender/depsgraph/intern
parentd85fd8feeb1b493b891158fd4cc5ed8bd44c7990 (diff)
Depsgraph: Fix several ID blocks added multiple times to depsgraph
Ideally, we need to get rid of whole bmain iteration in depsgraph construction, but then it's not clear which movie clips and such to evaluate.
Diffstat (limited to 'source/blender/depsgraph/intern')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc12
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc12
2 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 3c7740e62fd..0545dd33a29 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -1337,6 +1337,9 @@ void DepsgraphNodeBuilder::build_compositor(Scene *scene)
void DepsgraphNodeBuilder::build_gpencil(bGPdata *gpd)
{
+ if (built_map_.checkIsBuiltAndTag(gpd)) {
+ return;
+ }
ID *gpd_id = &gpd->id;
/* TODO(sergey): what about multiple users of same datablock? This should
@@ -1351,6 +1354,9 @@ void DepsgraphNodeBuilder::build_gpencil(bGPdata *gpd)
void DepsgraphNodeBuilder::build_cachefile(CacheFile *cache_file)
{
+ if (built_map_.checkIsBuiltAndTag(cache_file)) {
+ return;
+ }
ID *cache_file_id = &cache_file->id;
/* Animation, */
build_animdata(cache_file_id);
@@ -1361,6 +1367,9 @@ void DepsgraphNodeBuilder::build_cachefile(CacheFile *cache_file)
void DepsgraphNodeBuilder::build_mask(Mask *mask)
{
+ if (built_map_.checkIsBuiltAndTag(mask)) {
+ return;
+ }
ID *mask_id = &mask->id;
Mask *mask_cow = get_cow_datablock(mask);
/* F-Curve based animation. */
@@ -1379,6 +1388,9 @@ void DepsgraphNodeBuilder::build_mask(Mask *mask)
void DepsgraphNodeBuilder::build_movieclip(MovieClip *clip)
{
+ if (built_map_.checkIsBuiltAndTag(clip)) {
+ return;
+ }
ID *clip_id = &clip->id;
MovieClip *clip_cow = get_cow_datablock(clip);
/* Animation. */
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 94c9f0cdd57..ae25aa77d98 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1983,6 +1983,9 @@ void DepsgraphRelationBuilder::build_compositor(Scene *scene)
void DepsgraphRelationBuilder::build_gpencil(bGPdata *gpd)
{
+ if (built_map_.checkIsBuiltAndTag(gpd)) {
+ return;
+ }
/* animation */
build_animdata(&gpd->id);
@@ -1991,12 +1994,18 @@ void DepsgraphRelationBuilder::build_gpencil(bGPdata *gpd)
void DepsgraphRelationBuilder::build_cachefile(CacheFile *cache_file)
{
+ if (built_map_.checkIsBuiltAndTag(cache_file)) {
+ return;
+ }
/* Animation. */
build_animdata(&cache_file->id);
}
void DepsgraphRelationBuilder::build_mask(Mask *mask)
{
+ if (built_map_.checkIsBuiltAndTag(mask)) {
+ return;
+ }
ID *mask_id = &mask->id;
/* F-Curve animation. */
build_animdata(mask_id);
@@ -2013,6 +2022,9 @@ void DepsgraphRelationBuilder::build_mask(Mask *mask)
void DepsgraphRelationBuilder::build_movieclip(MovieClip *clip)
{
+ if (built_map_.checkIsBuiltAndTag(clip)) {
+ return;
+ }
/* Animation. */
build_animdata(&clip->id);
}