|On this page|
This node creates work items that run a Python script either in process or as a scheduled job. In-process scripts can access a larger amount of information about the PDG graph, as well as other objects and settings within the current Houdini session. If the script is run out of process it is limited to accessing the attributes of the work item it is associated with, and anything the script can import itself.
The node will always created exactly one work item per upstream item, with the Python Code field as the work to be done for that item. To generate custom work item configuration, the Python Processor node should be used instead.
The Python script that the work item will execute.
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.
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.
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.
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.
Evaluate In Process
Indicates whether or no the script should be run in the current Houdini process.
Copy Inputs to Outputs
When this option is enabled, the Python Script node will automatically copy input files to its output file list.
When running out of process, this parameter determines which Python executable to use to run the script.
Custom Python Bin
When Python Bin is set to Custom this parameter is evaluated to determine the path to the Python executable.
Extra arguments passed to the Python executable itself to configure the behavior of the interpreter.
Arguments passed to the Python script. These values are accessible in the
Reset Python Path Variables
When this toggle is enabled the PYTHONHOME and PYTHONPATH variables defined by Houdini are reset in the external Python process. This is necessary when using a Python version that is incompatible with the one built into Houdini.
The Python code that is run for each work item.
When running out of process, the code is saved to disk an executed using the
specified Python interpreter. The script has access to the
variable which provides an API to access the name, index, frame and
attributes of the work item associated with the script. Additionally, the
strData helper functions can be used to
query attributes on the work item.
When running in-process the script is run using the Python interpreter
embedded in Houdini. In addition to the
work_item variable, the
parent_item variables are also available. The former is a reference to the
node that owns the work item, and the
parent_item variable is a reference
to the parent or
TOP Scheduler Override
This parameter overrides the TOP scheduler for this node.
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.
The work item priority is set to the value of Priority Expression.
Node Defines Priority
This parameter is only available when Work Item Priority is set to Custom Expression.
This parameter specifies an expression for work item priority. The expression is evaluated for each work item in the node.