diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-07-19 12:31:44 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-07-19 12:31:44 +0300 |
commit | d3c063188e00624040bc6a25441da456e3f4cbf6 (patch) | |
tree | 0d4e39c471f1f084aa6d8530b03adf4aefb93083 /source/blender/depsgraph/intern/node | |
parent | ff98b5eaa805d411f967921eca7bea24f24ea4dc (diff) |
Depsgraph: Make name and name tag optional in component node
Matches the builder API, making some code less verbose.
Diffstat (limited to 'source/blender/depsgraph/intern/node')
-rw-r--r-- | source/blender/depsgraph/intern/node/deg_node_component.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/depsgraph/intern/node/deg_node_component.h b/source/blender/depsgraph/intern/node/deg_node_component.h index b31881a96c0..ee6c56b1171 100644 --- a/source/blender/depsgraph/intern/node/deg_node_component.h +++ b/source/blender/depsgraph/intern/node/deg_node_component.h @@ -60,16 +60,20 @@ struct ComponentNode : public Node { * See #add_operation for the meaning and examples of #name and #name_tag. */ OperationNode *find_operation(OperationIDKey key) const; - OperationNode *find_operation(OperationCode opcode, const char *name, int name_tag) const; + OperationNode *find_operation(OperationCode opcode, + const char *name = "", + int name_tag = -1) const; /* Find an existing operation, will throw an assert() if it does not exist. * See #add_operation for the meaning and examples of #name and #name_tag. */ OperationNode *get_operation(OperationIDKey key) const; - OperationNode *get_operation(OperationCode opcode, const char *name, int name_tag) const; + OperationNode *get_operation(OperationCode opcode, + const char *name = "", + int name_tag = -1) const; /* Check operation exists and return it. */ bool has_operation(OperationIDKey key) const; - bool has_operation(OperationCode opcode, const char *name, int name_tag) const; + bool has_operation(OperationCode opcode, const char *name = "", int name_tag = -1) const; /** * Create a new node for representing an operation and add this to graph @@ -89,8 +93,8 @@ struct ComponentNode : public Node { */ OperationNode *add_operation(const DepsEvalOperationCb &op, OperationCode opcode, - const char *name, - int name_tag); + const char *name = "", + int name_tag = -1); /* Entry/exit operations management. * |