[Bf-blender-cvs] [d211c36c836] blender2.8: Depsgraph: Allow tagging whole scene for base flags flush
Sergey Sharybin
noreply at git.blender.org
Fri Nov 24 17:10:36 CET 2017
Commit: d211c36c836a929d9ac6feb693fbab2e1599fa00
Author: Sergey Sharybin
Date: Fri Nov 24 16:34:06 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBd211c36c836a929d9ac6feb693fbab2e1599fa00
Depsgraph: Allow tagging whole scene for base flags flush
===================================================================
M source/blender/depsgraph/intern/depsgraph_tag.cc
===================================================================
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)
More information about the Bf-blender-cvs
mailing list