Since | 20.5 |
You can use this node to create or update a dictionary attribute. The node can merge other attributes into the dictionary, merge existing dictionaries into a new dictionary, or add specific key/value pairs to a dictionary.
Parameters ¶
Generate When
Determines when this node will generate work items. You should generally leave this set to “Automatic” unless you know the node requires a specific generation mode, or that the work items need to be generated dynamically.
All Upstream Items are Generated
This node will generate work items once all of the input nodes have generated their work items.
All Upstream Items are Cooked
This node will generate work items once all of the input nodes have cooked their work items.
Each Upstream Item is Cooked
This node will generate work items each time a work item in an input node is cooked.
Automatic
The generation mode is selected based on the generation mode of the input nodes. If any of the input nodes are generating work items when their inputs cook, this node will be set to Each Upstream Item is Cooked. Otherwise, it will be set to All Upstream Items are Generated.
Enable When
When on, sets to an expression to conditionally enable or disable the functionality of this node. The expression is evaluated for each work item, so it can use work item specific variables.
Attribute Name
The name of the dictionary attribute.
Attribute Index
The array index of the dictionary within the attribute. By default, the node operates on the first dictionary in the attribute.
Existing Attribute
Determines what the node does if a work item already has an attribute with the Attribute Name.
Replace Existing Attribute
The existing attribute is overwritten regardless of type. Creates a new attribute if doesn’t exist.
Keep Existing Attribute
The existing attribute is kept as-is regardless of type. Creates a new attribute if doesn’t exist.
Update Existing Attribute
The existing attribute is updated if it’s a dictionary attribute. The attribute and the contents of the dictionary at Attribute Index are not cleared ahead of time, so existing keys are kept. If the attribute exists and is not a dictionary, the node ignores it. Creates a new attribute if doesn’t exist.
Warn on Type Mis-match
The same as Update Existing Attribute, except emits a warning if the attribute exists and has a different type.
Error on Type Mis-match
The same as Update Existing Attribute, except the node errors out if the attribute exists and has a different type.
Merge Attributes
Specifies the names of the int, float, string
or dictionary
attributes from the parent work item merged into Attribute Name as key/value pairs. The list of attribute names can use the Attribute Pattern Syntax.
Merge Dictionaries
Specifies the names of the existing dictionary attributes from the parent work item merged into Attribute Name. The key/value pairs from any matching dictionaries are merged directly into the dictionary attribute this node is operating on. The list of attribute names can use the Attribute Pattern Syntax.
Remove Keys
An Attribute Pattern that specifies the keys removed from the dictionary.
Values
A list of key/value pairs to add to the dictionary.
Key
The key to add to the dictionary.
Type
The type of value to add to the dictionary.
Integer Value
The integer value to add to the dictionary the Key, When Type is Integer.
Float Value
The float value to add to the dictionary the Key, when Type is Float.
String Value
The string value to add to the dictionary the Key, when Type is String.
Array Pattern
The Value Pattern that defines the array values, when Type is Integer Array, Float Array, or String Array.
Inclusive
Determines whether or not ranges generated using the Array Pattern are inclusive, i.e. if they should include the last number in the range.
Attriubte Name
When Type is set to Attribute, this parameter specifies the name of the attribute on the upstream item that should be set as the value for the specified Key.
Export Keys
When this parameter is enabled, the ordered list of keys in the dictionary is saved to a string attribute defined by this parameter.
Export Attributes
When this parameter is enabled, key/value pairs in the dictionary are exported to individual work item attributes. The type of the value in the dictionary determines the type of attribute created. For example, string and string array values become string attributes, while dictionary values that are floats, matrices, float arrays, or vectors are all converted into float attributes. Keys are exported to attributes after all other value modification operations are performed.
Existing Attribute
Determines what the node does when Export Attributes is enabled and a name conflict occurs between an existing attribute and an exported key.
Replace Existing Attribute
The existing attribute is overwritten regardless of type. Creates a new attribute if doesn’t exist.
Keep Existing Attribute
The existing attribute is kept as-is regardless of type. Creates a new attribute if doesn’t exist.
Update Existing Attribute
The existing attribute is updated if it’s a dictionary attribute. The attribute and the contents of the dictionary at Attribute Index are not cleared ahead of time, so existing keys are kept. If the attribute exists and is not a dictionary, the node ignores it. Creates a new attribute if doesn’t exist.
Warn on Type Mis-match
The same as Update Existing Attribute, except emits a warning if the attribute exists and has a different type.
Error on Type Mis-match
The same as Update Existing Attribute, except the node errors out if the attribute exists and has a different type.
See also |