diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-05 19:13:26 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-05 19:35:48 +0300 |
commit | d355a2b7d86aeee82e53e7ce25b5bc21f83ac77e (patch) | |
tree | 7378d65443999124bed57a337f9aab554e2cd5a0 /source/blender/depsgraph | |
parent | 56aa86ae2517e6be66826bf2347e6e73cd7e3688 (diff) |
Depsgrapgh: Use more distinctive opcode for texture and image evaluation
Diffstat (limited to 'source/blender/depsgraph')
6 files changed, 18 insertions, 7 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index d1837e7a69a..3fcaa12f036 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -1534,23 +1534,20 @@ void DepsgraphNodeBuilder::build_texture(Tex *texture) build_image(texture->ima); } } - /* Placeholder so we can add relations and tag ID node for update. */ add_operation_node(&texture->id, - DEG_NODE_TYPE_PARAMETERS, + DEG_NODE_TYPE_GENERIC_DATABLOCK, NULL, - DEG_OPCODE_PLACEHOLDER); + DEG_OPCODE_GENERIC_DATABLOCK_UPDATE); } void DepsgraphNodeBuilder::build_image(Image *image) { if (built_map_.checkIsBuiltAndTag(image)) { return; } - /* Placeholder so we can add relations and tag ID node for update. */ add_operation_node(&image->id, - DEG_NODE_TYPE_PARAMETERS, + DEG_NODE_TYPE_GENERIC_DATABLOCK, NULL, - DEG_OPCODE_PLACEHOLDER, - "Image Eval"); + DEG_OPCODE_GENERIC_DATABLOCK_UPDATE); } void DepsgraphNodeBuilder::build_compositor(Scene *scene) 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 55eaf314a0a..15744ff614f 100644 --- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc +++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc @@ -422,6 +422,7 @@ static void deg_debug_graphviz_node(const DebugContext &ctx, case DEG_NODE_TYPE_BATCH_CACHE: case DEG_NODE_TYPE_DUPLI: case DEG_NODE_TYPE_SYNCHRONIZE: + case DEG_NODE_TYPE_GENERIC_DATABLOCK: { ComponentDepsNode *comp_node = (ComponentDepsNode *)node; if (!comp_node->operations.empty()) { diff --git a/source/blender/depsgraph/intern/depsgraph_type_defines.cc b/source/blender/depsgraph/intern/depsgraph_type_defines.cc index d93882a7170..4edf616961c 100644 --- a/source/blender/depsgraph/intern/depsgraph_type_defines.cc +++ b/source/blender/depsgraph/intern/depsgraph_type_defines.cc @@ -106,6 +106,8 @@ const char *nodeTypeAsString(eDepsNode_Type type) STRINGIFY_TYPE(DUPLI); /* Synchronization. */ STRINGIFY_TYPE(SYNCHRONIZE); + /* Generic datablock. */ + STRINGIFY_TYPE(GENERIC_DATABLOCK); /* Total number of meaningful node types. */ case NUM_DEG_NODE_TYPES: return "SpecialCase"; @@ -184,6 +186,8 @@ const char *operationCodeAsString(eDepsOperation_Code opcode) STRINGIFY_OPCODE(MOVIECLIP_SELECT_UPDATE); /* Synchronization. */ STRINGIFY_OPCODE(SYNCHRONIZE_TO_ORIGINAL); + /* Generic datablock. */ + STRINGIFY_OPCODE(GENERIC_DATABLOCK_UPDATE); case DEG_NUM_OPCODES: return "SpecialCase"; #undef STRINGIFY_OPCODE diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h index 61a91c13913..2de614ff8ad 100644 --- a/source/blender/depsgraph/intern/depsgraph_types.h +++ b/source/blender/depsgraph/intern/depsgraph_types.h @@ -138,6 +138,9 @@ typedef enum eDepsNode_Type { * changed in view layer. */ DEG_NODE_TYPE_OBJECT_FROM_LAYER, + /* Un-interestying datablock, which is a part of dependency graph, but does + * not have very distinctive update procedure. */ + DEG_NODE_TYPE_GENERIC_DATABLOCK, /* **** Evaluation-Related Outer Types (with Subdata) **** */ @@ -292,6 +295,9 @@ typedef enum eDepsOperation_Code { /* Synchronization clips. ----------------------------------------------- */ DEG_OPCODE_SYNCHRONIZE_TO_ORIGINAL, + /* Generic datablock ---------------------------------------------------- */ + DEG_OPCODE_GENERIC_DATABLOCK_UPDATE, + DEG_NUM_OPCODES, } eDepsOperation_Code; const char *operationCodeAsString(eDepsOperation_Code opcode); diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.cc b/source/blender/depsgraph/intern/nodes/deg_node_component.cc index c1c5899db37..dc4661cef53 100644 --- a/source/blender/depsgraph/intern/nodes/deg_node_component.cc +++ b/source/blender/depsgraph/intern/nodes/deg_node_component.cc @@ -402,6 +402,7 @@ DEG_COMPONENT_NODE_DEFINE(Transform, TRANSFORM, ID_RECALC_TRANS DEG_COMPONENT_NODE_DEFINE(ObjectFromLayer, OBJECT_FROM_LAYER, ID_RECALC); DEG_COMPONENT_NODE_DEFINE(Dupli, DUPLI, 0); DEG_COMPONENT_NODE_DEFINE(Synchronize, SYNCHRONIZE, 0); +DEG_COMPONENT_NODE_DEFINE(GenericDatablock, GENERIC_DATABLOCK, 0); /* Node Types Register =================================== */ @@ -426,6 +427,7 @@ void deg_register_component_depsnodes() deg_register_node_typeinfo(&DNTI_OBJECT_FROM_LAYER); deg_register_node_typeinfo(&DNTI_DUPLI); deg_register_node_typeinfo(&DNTI_SYNCHRONIZE); + deg_register_node_typeinfo(&DNTI_GENERIC_DATABLOCK); } } // 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 f1ad3208952..0852d886ae4 100644 --- a/source/blender/depsgraph/intern/nodes/deg_node_component.h +++ b/source/blender/depsgraph/intern/nodes/deg_node_component.h @@ -201,6 +201,7 @@ DEG_COMPONENT_NODE_DECLARE_GENERIC(Transform); DEG_COMPONENT_NODE_DECLARE_NO_COW_TAG_ON_UPDATE(ObjectFromLayer); DEG_COMPONENT_NODE_DECLARE_GENERIC(Dupli); DEG_COMPONENT_NODE_DECLARE_GENERIC(Synchronize); +DEG_COMPONENT_NODE_DECLARE_GENERIC(GenericDatablock); /* Bone Component */ struct BoneComponentDepsNode : public ComponentDepsNode { |