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>2017-11-24 18:34:06 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-24 18:34:06 +0300
commitd211c36c836a929d9ac6feb693fbab2e1599fa00 (patch)
tree5cc3e92e7113bb7194b41e7b5d839984e3cb5aa0 /source
parent20c8c9a3c7b19f5304566587495cc167c327635d (diff)
Depsgraph: Allow tagging whole scene for base flags flush
Diffstat (limited to 'source')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc31
1 files changed, 21 insertions, 10 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index d13f40af1bc..faaf3a828b2 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -287,7 +287,6 @@ void id_tag_update_select_update(Depsgraph *graph, IDDepsNode *id_node)
ComponentDepsNode *component;
OperationDepsNode *node = NULL;
const ID_Type id_type = GS(id_node->id_orig->name);
-
if (id_type == ID_SCE) {
/* We need to flush base flags to all objects in a scene since we
* don't know which ones changed. However, we don't want to update
@@ -328,17 +327,29 @@ void id_tag_update_select_update(Depsgraph *graph, IDDepsNode *id_node)
void id_tag_update_base_flags(Depsgraph *graph, IDDepsNode *id_node)
{
- ComponentDepsNode *component =
- id_node->find_component(DEG_NODE_TYPE_LAYER_COLLECTIONS);
- if (component == NULL) {
- return;
+ ComponentDepsNode *component;
+ OperationDepsNode *node = NULL;
+ const ID_Type id_type = GS(id_node->id_orig->name);
+ if (id_type == ID_SCE) {
+ component = id_node->find_component(DEG_NODE_TYPE_LAYER_COLLECTIONS);
+ if (component == NULL) {
+ return;
+ }
+ node = component->find_operation(DEG_OPCODE_VIEW_LAYER_INIT);
}
- OperationDepsNode *node =
- component->find_operation(DEG_OPCODE_OBJECT_BASE_FLAGS);
- if (node == NULL) {
- return;
+ else if (id_type == ID_OB) {
+ component = id_node->find_component(DEG_NODE_TYPE_LAYER_COLLECTIONS);
+ if (component == NULL) {
+ return;
+ }
+ node = component->find_operation(DEG_OPCODE_OBJECT_BASE_FLAGS);
+ if (node == NULL) {
+ return;
+ }
+ }
+ if (node != NULL) {
+ node->tag_update(graph);
}
- node->tag_update(graph);
}
void id_tag_update_ntree_special(Main *bmain, Depsgraph *graph, ID *id, int flag)