See pdg.WorkItemHolder.addWorkItem() for more information.
Methods
batch
: bool
Property
When set to True
, indicates that the work item will be constructed as a
batch.
Defaults to False
.
batchOffset
: int
Property
When batch
is True
, the index offset for items in the batch.
batchSize
: int
Property
The size of the batch, when batch
is set to True
.
cloneMode
: pdg.cloneMode
Property
The data cloning mode when constructing the work item.
cloneResultData
: bool
Property
When set to True
, the new work item will clone output results from its
parent work item. Defaults to False
.
cloneTarget
: pdg.WorkItem
Property
An optional clone target, where data is cloned from. Default to None
.
inProcess
: bool
Property
When set to True
, the work item is marked as being evaluated in process
instead of out of process. Defaults to False
.
index
: int
Property
The work item index. Defaults to the parent item’s index if this is set to
-1. Defaults to -1
.
isNoGenerate
: bool
Property
When this flag is set, the work item will be marked as not capable of
generating new items in downstream nodes. Defaults to False
.
isServiceMode
: bool
Property
When both this flag and the inProcess flag are set to true, this work item will be cooked by the PDG service associated with the work item’s node.
name
: str
Property
The name of the work item, defaults to the node’s name plus the index.
parent
: pdg.WorkItem
Property
The parent for the newly constructed work item. For dynamic nodes this
option cannot be changed, since the parent is whichever completed upstream
work item was passed into the onGenerate
callback. For static nodes this
can be set to any of the upstream static work items.
parentArray
: list
of pdg.WorkItem
Property
When generating a static batch, it is possible to specify a different parent item for each of the items in the batch. This is done by passing an array of work items into the holder using this property. If the array is smaller than the number of batches being produced, the last element of the array is reused as the parent for all the batches beyond the length of the array.
parentArrayOffset
: int
Property
When using a parentArray
this property can be used to specify the
starting offset in the array. By default the array is accessed starting at
index 0. This is useful when generating multiple batches to avoid having
to build separate parent array values for each batch. The same array can
be reused with a different offset value to each call to addWorkItem
.
preserveType
: bool
Property
When set to true, the new item will attempt to keep the work item data type
of the parent item. Defaults to False
.
priority
: int
or None
Property
The priority value for the work item. Defaults to None
.
typeName
: str
Property
The name of the work item data type to use when constructing the work item. Defaults to the node’s default work item type name.