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>2017-11-28 14:13:07 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-28 16:24:56 +0300
commit86bfce6794a527e553b3a9a294dda89f035ed3b6 (patch)
treeeff38e467581c7f8bf8f9725402dbaee90160521 /source/blender/depsgraph/intern/depsgraph_tag.cc
parent604de7cbe8401ef781576eb587192a9d71ba35cf (diff)
Depsgraph: Don't call DEG ID update functions directly
There might be much more logic involved there, also we might not know proper evaluated CoW pointer there yet. So we leave this to dependency graph to decide what exactly to do here.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_tag.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index faaf3a828b2..b21a65c8273 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -352,6 +352,15 @@ void id_tag_update_base_flags(Depsgraph *graph, IDDepsNode *id_node)
}
}
+void id_tag_update_editors_update(Main *bmain, Depsgraph * /*graph*/, ID *id)
+{
+ /* NOTE: We handle this immediately, without delaying anything, to be
+ * sure we don't cause threading issues with OpenGL.
+ */
+ /* TODO(sergey): Make sure this works for CoW-ed datablocks as well. */
+ deg_editors_id_update(bmain, id);
+}
+
void id_tag_update_ntree_special(Main *bmain, Depsgraph *graph, ID *id, int flag)
{
bNodeTree *ntree = NULL;
@@ -421,6 +430,9 @@ void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)
if (flag & DEG_TAG_BASE_FLAGS_UPDATE) {
id_tag_update_base_flags(graph, id_node);
}
+ if (flag & DEG_TAG_EDITORS_UPDATE) {
+ id_tag_update_editors_update(bmain, graph, id);
+ }
id_tag_update_ntree_special(bmain, graph, id, flag);
}