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-23 18:03:44 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-24 12:19:48 +0300
commita5d763a11ee46fff12d53e8cb21b3ab45fa2c64d (patch)
tree075d6fa83432ca1e5b6c56b6773756cd7ea71301 /source/blender/depsgraph/intern/depsgraph_tag.cc
parent0f5ef668daa041514376a98e2957248626e5649d (diff)
Depsgraph: Use depsgraph to handle edit mode selection
This is crucial bit since batch cache is stored in the evaluated object, meaning we can't tag it's hatch cache dirty from the notifier system. Not easily at least. Better to leave this job to depsgraph, it knows all the copies of data.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_tag.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 58bae1f5cc6..968be5269c4 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -282,6 +282,18 @@ void id_tag_update_copy_on_write(Depsgraph *graph, IDDepsNode *id_node)
cow_node->tag_update(graph);
}
+void id_tag_update_select_update(Depsgraph *graph, IDDepsNode *id_node)
+{
+ ComponentDepsNode *batch_cache_comp =
+ id_node->find_component(DEG_NODE_TYPE_BATCH_CACHE);
+ OperationDepsNode *select_update_node =
+ batch_cache_comp->find_operation(DEG_OPCODE_GEOMETRY_SELECT_UPDATE,
+ "", -1);
+ if (select_update_node != NULL) {
+ select_update_node->tag_update(graph);
+ }
+}
+
void id_tag_update_ntree_special(Main *bmain, Depsgraph *graph, ID *id, int flag)
{
bNodeTree *ntree = NULL;
@@ -345,6 +357,9 @@ void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)
if (flag & DEG_TAG_COPY_ON_WRITE) {
id_tag_update_copy_on_write(graph, id_node);
}
+ if (flag & DEG_TAG_SELECT_UPDATE) {
+ id_tag_update_select_update(graph, id_node);
+ }
id_tag_update_ntree_special(bmain, graph, id, flag);
}