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.
cloneOutputFiles
: bool
Property
When set to True
, the new work item will clone output files from its
parent work item. Defaults to False
.
cloneResultData
: bool
Property
This property is deprecated. Use pdg.WorkItemHolder.cloneOutputFiles instead.
cloneTarget
: pdg.WorkItem
Property
An optional clone target, where data is cloned from. Default to None
.
cookType
: pdg.workItemCookType
Property
The cook type for the work item. This is preferred over the older `inProcess option. Defaults to pdg.workItemCookType.Automatic, which means it uses the setting from the node.
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
.
This property is deprecated – cookType
should be used instead.
index
: int
Property
The work item index. Defaults to the parent item’s index if this is set to
-1. Defaults to -1
.
isDynamicBatch
: bool
Property
Whether or not the batch is allowed to dynamically add sub items while
it cooks. Only used when batch
is set to True
.
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
.
isPartialCook
: bool
Property
Whether or not a batch supports cooking from part way through its list of
sub items, if some of the items are already cached. Only used when batch
is set to True
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
This option is deprecated, and will have no effect on work item(s) created using this options instance. Instead, use pdg.WorkItem.setLabel to customize the display name of a work item.
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.