diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-07-19 12:27:50 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-07-19 12:29:00 +0300 |
commit | ff98b5eaa805d411f967921eca7bea24f24ea4dc (patch) | |
tree | d268e5ca85a9e5ce567b2ff6e557cf9e4e2f34c0 /source/blender/depsgraph | |
parent | e00a027c1e01396de9fa141965e57a0e6c1dc1cd (diff) |
Depsgraph: Clarify comment in the component node
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/node/deg_node_component.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/depsgraph/intern/node/deg_node_component.h b/source/blender/depsgraph/intern/node/deg_node_component.h index 6958866af3b..b31881a96c0 100644 --- a/source/blender/depsgraph/intern/node/deg_node_component.h +++ b/source/blender/depsgraph/intern/node/deg_node_component.h @@ -56,12 +56,14 @@ struct ComponentNode : public Node { virtual string identifier() const override; - /* Find an existing operation, if requested operation does not exist - * nullptr will be returned. */ + /* Find an existing operation, if requested operation does not exist nullptr will be returned. + * 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; - /* Find an existing operation, will throw an assert() if it does not exist. */ + /* 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; @@ -71,12 +73,19 @@ struct ComponentNode : public Node { /** * Create a new node for representing an operation and add this to graph + * * \warning If an existing node is found, it will be modified. This helps * when node may have been partially created earlier (e.g. parent ref before * parent item is added) * * \param opcode: The operation to perform. - * \param name: Identifier for operation - used to find/locate it again. + * \param name: An optional identifier for operation. It will be used to tell operation nodes + * with the same code apart. For example, parameter operation code will have name + * set to the corresponding custom property name + * \param name_tag: An optional integer tag for the name. Is an additional way to tell operations + * apart. For example, RNA path to an array property will have the same opcode + * of PARAMETERS, name corresponding to the property name, and name tag + * corresponding to the array index within the property. */ OperationNode *add_operation(const DepsEvalOperationCb &op, OperationCode opcode, |