Houdini 20.5 Nodes TOP nodes

File Range TOP node

Creates a range of work items based on files that match a certain pattern.

On this page
Since 18.0

This node generates a work item for a range of frames based on a file pattern.

For example, if the Frame Range parameter is set to 1,10,1 and the Pattern parameter is set to $HIP/render/$HIPNAME.$OS.$F4.exr, then the node would generate up to 10 work items.

Whenever this node is asked to generate items, like when it cooks or when you ask nodes to pre-generate static items, the node checks if the pattern matches different files from the last cook and if the modification times have changed on any files. If the answer is yes, then the node updates the changed items and marks them dirty. So when the directory contents change, usually only the changed items need to be recooked.

TOP Attributes

directory

string

The directory containing the matched file.

extension

string

The extension of the file associated with the work item.

filename

string

The name of the file including the extension.

exists

int

When Missing Files is set to Create Work Items, this attribute is added and set to 1 if the file exists and 0 if it does not.

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.

File

Frame Range

The start, end, and step size of the frame range to generate.

File Pattern

Specifies the pattern for the node to match file paths against.

File Pattern allows wildcards such as ? (match any character), * (match any string of characters), and [abc] (match any one of the characters inside the square brackets). For example, *.png matches any file that ends with .png. $F, $FF, $F4 are also supported.

Operation

Missing Files

What to do when a file is not matched.

Ignore

Do not generate work items for missing files.

Set Node Error

Sets an error on the node.

Create Work Items

Creates a work item for the missing file and sets an attribute indicating that it is missing.

File Exists Attribute

The name of the Int attribute to be added to work items. The value is 1 if the file exists and 0 if it does not.

Output File Tag

When on, the node assigns this file tag to the output file paths. When off, the node guesses appropriate file tags based on filename extensions.

Copy File(s) to Working Directory

Indicates that the globbed files should be copied from their source location to the scheduler’s working directory when this work item cooks.

Enabling this toggle sets the pdg.attribFlag.Transfer attribute flag on the work item’s output file list.

Examples

FileRange Example for File Range TOP node

This example file demonstrates how the File Range TOP can be used to generate a list of work items from a sequence of files.

See also

TOP nodes