Since | 17.5 |
You need to use this node in conjunction with a shared server like the
Python Server,
Houdini Server Begin,
Maya Server Begin, or
Nuke Server Begin.
This node sends a command or custom code to a server, depending on what the server accepts. The Houdini Server runs Python code that uses the HOM API, the Maya Server uses MEL or Python, and the generic command server uses the format defined by its server implementation.
When executing Python code, a work_item
object is automatically made available. You can use this to read or write data from PDG. This work_item
object supports a subset of the pdg.WorkItem API.
myattr_value = work_item.stringAttribValue('myattr') file_path = save_my_file(myattr_value) work_item.addResultData(file_path)
The command script is evaluated in a temporary namespace, so any local variables you create will be cleaned up afterwards. If you wish to use a variable in a subsequent command, you should make it global.
# Make myvar visible to subsequent commands on this server global myvar; myvar = 42;
Note
When using this node with a Maya Server, the command script is assumed to be Python code unless
//mel
is the first line of the script, in which case the script text is treated as MEL code. The last line of the MEL script determines the value that is added to the Command Send work_item
.
Parameters
Command
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.
Cache Mode
Determines how the processor node handles work items that report expected file results.
Automatic
If the expected result file exists on disk, the work item is marked as cooked without being scheduled. If the file does not exist on disk, the work item is scheduled as normal. If upstream work item dependencies write out new files during a cook, the cache files on work items in this node will also be marked as out-of-date.
Automatic (Ignore Upstream)
The same as Automatic, except upstream file writes do not invalidate cache files on work items in this node and this node will only check output files for its own work items.
Read Files
If the expected result file exists on disk, the work item is marked as cooked without being scheduled. Otherwise the work item is marked as failed.
Write Files
Work items are always scheduled and the expected result file is ignored even if it exists on disk.
Copy Spare Parms to Attributes
When enabled, all spare parms are copied to generated work items as attributes. If there are parms that you want to prevent being copied apply the tag pdg::nocopy.
Remote Script
Specifies the code to send to the shared server.
If the server is a Houdini Server this script should contain Python code and you can make use of the HOM API in it. If the server is a Maya Server, this script should contain python code for the Maya API.
Output
See also |