Houdini 17.5 Nodes TOP nodes

Attribute Create TOP node

Creates or sets an attribute on all incoming work items.

On this page

This node lets you change internal attributes (pdg_index, pdg_frame, pdg_priority, pdg_output), as well as create/set custom attributes. If an attribute with the given name and type already exists, this will overwrite its size/value.

Parameters

Work Item Generation

Whether this node generates static or dynamic work items. You should generally leave this set to "Automatic" unless you know the node’s work items can be computed statically, or that they need to be generated dynamically.

Dynamic

This node always creates dynamic work items: it waits until the upstream work items are known, and generates new work items from the upstream work items.

Static

This node always creates static work items: it creates the number of work items it thinks it needs based on the parameters (and any upstream static items) before the network runs.

Automatic

If the input is static (a static processor, or a partitioner with only static inputs, or a mapper), this node generates static work items, otherwise it generates dynamic work items.

Create When

If you turn this on, the node only creates/sets the attribute(s) below to work items where the given expression evaluates to a non-zero value. For example, to only set an attribute on work items whose index is greater than 5, turn on Create when and set the expression to @pdg_index > 5.

Index

If you turn this on, the node sets each work item’s internal index attribute to the result of the given expression. For example, to set each work item’s index to be the value of its foo attribute minus one, turn on Index and set the expression to @foo - 1.

Frame

If you turn this on, the node sets each work item’s internal frame attribute to the result of the given expression. For example, to set each work item’s frame number to be the value of its source_frame attribute, turn on Frame and set the expression to @source_frame.

Priority

If you turn this on, the node sets each work item’s internal priority attribute to the result of the given expression. Work items with higher priority values are scheduled before work items with lower numbers.

String Attributes

A multi-parm allowing you to add/set one or more string attributes.

Name

The name of the string attribute to add/set.

Value

The value of the string attribute. This can be an expression that is evaluated for each incoming work item, however remember that in string parameters you must put expressions inside back-ticks.

Integer Attributes

A multi-parm allowing you to add/set one or more integer attributes.

Name

The name of the integer attribute to add/set.

Size

The vector size of the new integer attribute (1-4). Use 1 for a single scalar value, or 3 for a 3D vector.

Value

The value for the new integer attribute. This can be an expression that is evaluated for each incoming work item.

Float Attributes

A multi-parm allowing you to add/set one or more float attributes.

Name

The name of the float attribute to add/set.

Size

The vector size of the new float attribute (1-4). Use 1 for a single scalar value, or 3 for a 3D vector.

Value

The value for the new float attribute. This can be an expression that is evaluated for each incoming work item.

Result Data

A multi-parm allowing you to add/set one or more output file paths. (TOPs tracks, for each work item, the file paths of files created by that work item. Often the item’s work script updates this information automatically, but you can also use this node to set it "manually").

Value

A file path to add to each work item’s list of file outputs. This can be an expression that is evaluated for each incoming work item.

Tag

The file tag to apply to the added file path. For example, file/geo or file/pic. This can be an expression that is evaluated for each incoming work item, however remember that in string parameters you must put expressions inside back-ticks.

Check File Path

When this is on, the node checks whether the file path exists and is readable before adding it to a work item. If the file cannot be accessed, the node will error.

Examples

example_top_attributecreate Example for Attribute Create TOP node

This example demonstrates how to create attributes for workitems of TOP nodes.

The following examples include this node.

example_top_attributecopy Example for Attribute Copy TOP node

This example demonstrates how to copy attributes from one workitem to another.

example_top_attributecreate Example for Attribute Create TOP node

This example demonstrates how to create attributes for workitems of TOP nodes.

example_top_attributedelete Example for Attribute Delete TOP node

This example demonstrates how to delete attributes for workitems of TOP nodes.

example_top_attributefromstring Example for Attribute from String TOP node

This example demonstrates how to create attributes for workitems from a piece of string attribute coming from upstream.

example_top_filterbyexpression Example for Filter By Expression TOP node

This example demonstrates how to filter upstream workitems so that the remaining set can be further processed or debugged.

example_top_forloopwithfeedback

This example demonstrates how to use the for loop with feedback construct in PDG/TOPs.

example_top_jsonoutput Example for Json Output TOP node

This example demonstrates how to use json output node to write workitem data to json format, or to reformat existing json files.

example_top_partitionbyattribute Example for Partition by Attribute TOP node

This example demonstrates how to use the partition by attribute node in PDG/TOPs.

example_top_partitionbycomparison Example for Partition by Comparison TOP node

This example demonstrates how to use the partition by combination node in PDG/TOPs.

example_top_partitionbytile Example for Partition by Tile TOP node

This example demonstrates how to use the partition by tile node in PDG/TOPs.

example_top_perforce Example for Perforce TOP node

This example demonstrates how to perform multiple perforce operations.

example_top_pythonpartitioner Example for Python Partitioner TOP node

This example demonstrates how to use the Python Partitioner node in PDG/TOPs.

example_top_pythonprocessor Example for Python Processor TOP node

This example demonstrates how to use the python processor in PDG/TOPs.

example_top_pythonscript Example for Python Script TOP node

This example demonstrates how to use the Python Script node in PDG/TOPs.

example_top_sort Example for Sort TOP node

This example demonstrates how to use the sort node in PDG/TOPs.

example_top_topfetch Example for TOP Fetch TOP node

This example demonstrates how to use Top Fetch to fetch results from other top networks.

example_top_topfetchinput Example for TOP Fetch Input TOP node

This example demonstrates how to use Top Fetch to fetch results from other top networks (using Top Fetch Input).

example_top_workitemexpand Example for Work Item Expand TOP node

This example demonstrates how to use the workitem expand node in PDG/TOPs.

See also

TOP nodes