You can use this object to configure an pdg.Node instance. The object can only be edited during the onConfigureNode
processor node callback or when a cook is not in progress. See Processor Callbacks for details.
Methods
setInputAttrib(name, origin)
Sets the pdg.attribOrigin of the input attribute with the specified name
. Calling this method will override the configuration defined in the node template for this specific pdg.Node instance.
This method can be used to specify extra input attributes that are required by a particular instance of a node, for example based on parameter configuration.
setInputAttribDefault(origin)
Sets the pdg.attribOrigin that should be used for all input attributes that are not explicitly defined in the input attribute list. For example, a Python Script node will set the default origin to pdg.attribOrigin.Generate
if the script is running during the generate, and pdg.attribOrigin.Cook
if its running when the work item cooks.
setOutputAttrib(name, origin)
Sets the pdg.attribOrigin of the output attribute with the specified name
. Calling this method will override the configuration defined in the node template for this specific pdg.Node instance.
This method can be used to specify extra output attributes that are required by a particular instance of a node, for example based on parameter configuration.
setOutputAttribDefault(origin)
Sets the pdg.attribOrigin that should be used for all output attributes that are not explicitly defined in the output attribute list. For example, a Python Script node will set the default origin to pdg.attribOrigin.Generate
if the script is running during the generate, and pdg.attribOrigin.Cook
if its running when the work item cooks.
setPortOrigin(port_name, origin)
Sets the evaluation origin for the specified parameter port name. The origin
should be a pdg.attribOrigin entry, or a combination of multiple entries from that enumeration that are ORed together.
description
: str
Property
The description store on the node info, or empty string if no description has been set.
inputAttribs
: pdg.AttributeConfig
Property
Returns a pdg.AttributeConfig instance that describes the attributes that the node uses from upstream work items.
isAlwaysRegenerate
: bool
Property
Whether or not the node should always regenerate work items every cook. This should be set to True
if the node needs to inspect an external resource to determine if work items need to change.
isCompressWorkItemData
: bool
Property
Whether or not the node should compress work item data files on disk, when cooking out of process.
isDirtyOnIncomplete
: bool
Property
When this option is set to True
, the node will dirty itself every graph cook, unless the node successfully cooked all work items on the previous cook.
isDirtyOnRegenerate
: bool
Property
Whether or not the node should dirty all work items when it regenerates.
outputAttribs
: pdg.AttributeConfig
Property
Returns a pdg.AttributeConfig instance that describes the attributes that the node adds when generating or cooking work items.
portOrigins
: dict
of int
Property
Returns the current mapping of parameter port name to evaluation origin. This information is used by PDG to determine when a given parameter gets evaluated when the PDG graph is cooking, for the purpose of tracking attribute usage.
requiresEndBlock
: bool
Property
Set to True
if the node is a feedback begin block, and a corresponding end block is needed for correct behavior of the node.
requiresGeneratedInputs
: bool
Property
Set to True
if the node requires all input nodes to be fully generated before it can generate work items.
requiresSceneFile
: bool
Property
Set to True
if the node creates work items that require access to the current scene file.
stateFilter
: list
of pdg.workItemState
Property
When this property is a non-empty list, it specifies the validate work item states that the node can generate from. This can include the pdg.workItemState.CookedFail state, which lets the node generate from failed work items. If the list is empty, the node will generated from items that have succeeded or cooked from cache.
serviceName
: str
Property
The name of the service that this node is using, or empty if no service is being used.