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;
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 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.
How the processor node handles work items that report expected file results.
If the expected result file exists on disk, the work item is marked as cooked without being scheduled. If the file does not exist, the item is scheduled as normal.
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.
Work items are always scheduled and the excepted 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.
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.