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:
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)