On this page | |
Since | 17.5 |
Tip
You may want to avoid using destructive file operations such as move/rename and remove. They can make files appear to be missing, triggering the dependency system to do extra work. They can also make it harder to debug the network after it runs if intermediate files are not where they were.
This node can work in three different ways:
Do the rename(s) whenever the node generates work items (Rename During set to Generate)
The node tries to rename the files synchronously when it generates work items (including when you choose TOPs ▸ Generate Static Work Items), blocking until the renaming is done. This can lead to the node working once and then erroring because the “source” file has been moved/renamed.
Do the rename(s) when the work items cook in process (Rename During set to In Process)
The node performs the renames asynchronously when the work item cooks. Multiple renames may happen at the same time, but they're still processed in the current Houdini session.
Do the rename(s) when the work items cook out of process (Rename During set to Out of Process)
The smae as in process, except the work items each cook in their own Python process. This can be useful when renaming files as farm jobs, which may not be accessible on the local machine.
TOP Attributes ¶
|
file |
The directory where the source file will be moved |
|
string |
The extension of the destination file |
|
filename |
The filename of the destination file |
Parameters ¶
Node ¶
Rename During
When to rename the files.
Generate
The file(s) will be renamed during the work item generation stage.
Cook (In-Process)
The file(s) will be renamed during the cook and within the graph cooking process.
Cook (Out-of-Process)
The file(s) will be renamed during the cook and within their own process.
File Source
Specifies the source for the file that should be renamed.
Upstream Output File
Get the file path from the incoming work item’s file outputs that match the File Tag parameter. If multiple outputs match, the first one if selected.
Custom File Path
Copy the file specified by the File Path
parameter.
File Path
The path to the file to move/rename, if File Source set seto Custom File Path.
File Tag
The file tag to use when selecting input files, if File Source is set to Upstream Output File.
File Path
The new path of the file. This is used as the output
of the work item(s).
File Tag
The file tag to assign to the output
filename.
Schedulers ¶
TOP Scheduler Override
This parameter overrides the TOP scheduler for this node.
Schedule When
When enabled, this parameter can be used to specify an expression that determines which work items from the node should be scheduled. If the expression returns zero for a given work item, that work item will immediately be marked as cooked instead of being queued with a scheduler. If the expression returns a non-zero value, the work item is scheduled normally.
Work Item Label
Determines how the node should label its work items. This parameter allows you to assign non-unique label strings to your work items which are then used to identify the work items in the attribute panel, task bar, and scheduler job names.
Use Default Label
The work items in this node will use the default label from the TOP network, or have no label if the default is unset.
Inherit From Upstream Item
The work items inherit their labels from their parent work items.
Custom Expression
The work item label is set to the Label Expression custom expression which is evaluated for each item.
Node Defines Label
The work item label is defined in the node’s internal logic.
Label Expression
When on, this parameter specifies a custom label for work items created by this node. The parameter can be an expression that includes references to work item attributes or built-in properties. For example, $OS: @pdg_frame
will set the label of each work item based on its frame value.
Work Item Priority
This parameter determines how the current scheduler prioritizes the work items in this node.
Inherit From Upstream Item
The work items inherit their priority from their parent items. If a work item has no parent, its priority is set to 0.
Custom Expression
The work item priority is set to the value of Priority Expression.
Node Defines Priority
The work item priority is set based on the node’s own internal priority calculations.
This option is only available on the Python Processor TOP, ROP Fetch TOP, and ROP Output TOP nodes. These nodes define their own prioritization schemes that are implemented in their node logic.
Priority Expression
This parameter specifies an expression for work item priority. The expression is evaluated for each work item in the node.
This parameter is only available when Work Item Priority is set to Custom Expression.
Examples ¶
example_top_filerename Example for File Rename TOP node
This example demonstrates how to use the File Rename node to rename a group of files.