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>2018-06-14 16:00:50 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-06-14 17:04:09 +0300
commit42d887201465f24a43f320e20c9fba42a6e71b19 (patch)
treef2eef66e338d225da972de94cb7e2a797cf0fbd6 /source/blender
parent87b2444270403b9a826f564ddf58a310dcab2324 (diff)
Depsgraph: Use dedicated ocmponent for object's base flags flush
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc2
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc2
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc1
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc4
-rw-r--r--source/blender/depsgraph/intern/depsgraph_type_defines.cc1
-rw-r--r--source/blender/depsgraph/intern/depsgraph_types.h4
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.cc2
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.h1
8 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 4ea2840648f..ba34d24d9d5 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -552,7 +552,7 @@ void DepsgraphNodeBuilder::build_object_flags(
const bool is_from_set = (linked_state == DEG_ID_LINKED_VIA_SET);
/* TODO(sergey): Is this really best component to be used? */
add_operation_node(&object->id,
- DEG_NODE_TYPE_LAYER_COLLECTIONS,
+ DEG_NODE_TYPE_OBJECT_FROM_LAYER,
function_bind(BKE_object_eval_flush_base_flags,
_1,
scene_cow,
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index f1eb637e9eb..5312c7adac8 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -606,7 +606,7 @@ void DepsgraphRelationBuilder::build_object_flags(Base *base, Object *object)
DEG_NODE_TYPE_LAYER_COLLECTIONS,
DEG_OPCODE_VIEW_LAYER_EVAL);
OperationKey object_flags_key(&object->id,
- DEG_NODE_TYPE_LAYER_COLLECTIONS,
+ DEG_NODE_TYPE_OBJECT_FROM_LAYER,
DEG_OPCODE_OBJECT_BASE_FLAGS);
add_relation(view_layer_done_key, object_flags_key, "Base flags flush");
}
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
index d64ab79d918..72b86f698ef 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
@@ -386,6 +386,7 @@ static void deg_debug_graphviz_node(const DebugContext &ctx,
case DEG_NODE_TYPE_LAYER_COLLECTIONS:
case DEG_NODE_TYPE_EVAL_PARTICLES:
case DEG_NODE_TYPE_COPY_ON_WRITE:
+ case DEG_NODE_TYPE_OBJECT_FROM_LAYER:
case DEG_NODE_TYPE_BATCH_CACHE:
{
ComponentDepsNode *comp_node = (ComponentDepsNode *)node;
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 437999a06a9..0c349ba5265 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -142,7 +142,7 @@ void depsgraph_select_tag_to_component_opcode(
*operation_code = DEG_OPCODE_VIEW_LAYER_EVAL;
}
else if (id_type == ID_OB) {
- *component_type = DEG_NODE_TYPE_LAYER_COLLECTIONS;
+ *component_type = DEG_NODE_TYPE_OBJECT_FROM_LAYER;
*operation_code = DEG_OPCODE_OBJECT_BASE_FLAGS;
}
else {
@@ -162,7 +162,7 @@ void depsgraph_base_flags_tag_to_component_opcode(
*operation_code = DEG_OPCODE_VIEW_LAYER_EVAL;
}
else if (id_type == ID_OB) {
- *component_type = DEG_NODE_TYPE_LAYER_COLLECTIONS;
+ *component_type = DEG_NODE_TYPE_OBJECT_FROM_LAYER;
*operation_code = DEG_OPCODE_OBJECT_BASE_FLAGS;
}
}
diff --git a/source/blender/depsgraph/intern/depsgraph_type_defines.cc b/source/blender/depsgraph/intern/depsgraph_type_defines.cc
index 79d29f72b8d..9b1733bae8e 100644
--- a/source/blender/depsgraph/intern/depsgraph_type_defines.cc
+++ b/source/blender/depsgraph/intern/depsgraph_type_defines.cc
@@ -92,6 +92,7 @@ const char *nodeTypeAsString(eDepsNode_Type type)
STRINGIFY_TYPE(SEQUENCER);
STRINGIFY_TYPE(LAYER_COLLECTIONS);
STRINGIFY_TYPE(COPY_ON_WRITE);
+ STRINGIFY_TYPE(OBJECT_FROM_LAYER);
/* **** Evaluation-Related Outer Types (with Subdata) **** */
STRINGIFY_TYPE(EVAL_POSE);
STRINGIFY_TYPE(BONE);
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index cec279a04bb..c6eb0d57bac 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -134,6 +134,10 @@ typedef enum eDepsNode_Type {
* execution.
*/
DEG_NODE_TYPE_COPY_ON_WRITE,
+ /* Used by all operations which are updating object when something is
+ * changed in view layer.
+ */
+ DEG_NODE_TYPE_OBJECT_FROM_LAYER,
/* **** Evaluation-Related Outer Types (with Subdata) **** */
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.cc b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
index 699ee1a3cad..9600eadb126 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
@@ -392,6 +392,7 @@ DEG_COMPONENT_NODE_DEFINE(Sequencer, SEQUENCER, ID_RECALC);
DEG_COMPONENT_NODE_DEFINE(Shading, SHADING, ID_RECALC_DRAW);
DEG_COMPONENT_NODE_DEFINE(ShadingParameters, SHADING_PARAMETERS, ID_RECALC_DRAW);
DEG_COMPONENT_NODE_DEFINE(Transform, TRANSFORM, ID_RECALC_TRANSFORM);
+DEG_COMPONENT_NODE_DEFINE(ObjectFromLayer, OBJECT_FROM_LAYER, ID_RECALC);
/* Node Types Register =================================== */
@@ -412,6 +413,7 @@ void deg_register_component_depsnodes()
deg_register_node_typeinfo(&DNTI_SHADING);
deg_register_node_typeinfo(&DNTI_SHADING_PARAMETERS);
deg_register_node_typeinfo(&DNTI_TRANSFORM);
+ deg_register_node_typeinfo(&DNTI_OBJECT_FROM_LAYER);
}
} // namespace DEG
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.h b/source/blender/depsgraph/intern/nodes/deg_node_component.h
index 5b6461f950e..7338a99dfcb 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.h
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.h
@@ -182,6 +182,7 @@ DEG_COMPONENT_NODE_DECLARE_GENERIC(Sequencer);
DEG_COMPONENT_NODE_DECLARE_GENERIC(Shading);
DEG_COMPONENT_NODE_DECLARE_GENERIC(ShadingParameters);
DEG_COMPONENT_NODE_DECLARE_GENERIC(Transform);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(ObjectFromLayer);
/* Bone Component */
struct BoneComponentDepsNode : public ComponentDepsNode {