HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_NodeOptions Class Reference

#include <PDG_NodeOptions.h>

Public Types

using StateFilter = UT_Array< PDG_WorkItemState >
 

Public Member Functions

 PDG_NodeOptions ()
 
const StateFilterstateFilter () const
 
bool hasStateFilter () const
 Returns true if the node has at least one state in its state filter. More...
 
bool filterState (PDG_WorkItemState state) const
 Returns true if the state filter contains the specified state. More...
 
bool filterState (const PDG_WorkItem *work_item) const
 Returns true if the node can generate from the specified work item. More...
 
const UT_StringHolderdescription () const
 
bool hasDescription () const
 Returns true if a description has been set. More...
 
PDG_ServiceBlockCookType serviceBlockCookType () const
 Returns the service block cook type for this node. More...
 
bool requiresGeneratedInputs () const
 
bool requiresCookedInputs () const
 
bool requiresEndBlock () const
 Returns true if this node requires an end block to cook correctly. More...
 
bool requiresSceneFile () const
 
bool requiresInputData () const
 
bool isCompressWorkItemData () const
 
bool isAlwaysRegenerate () const
 
bool isDirtyOnRegenerate () const
 
bool isDirtyOnIncomplete () const
 
bool isClearFailures () const
 
bool allowDuplicateOutputs () const
 
bool usesSharedServers () const
 Returns true if this node creates work items that use shared servers. More...
 
bool usesDynamicBatching () const
 Returns true if thise node creates work items that use dynamic batching. More...
 
bool isValid () const
 Returns true if the node options are valid. More...
 
void setStateFilter (const StateFilter &filter)
 Sets the state filter. More...
 
void setDescription (const UT_StringHolder &desc)
 Sets the UI description for the node. More...
 
void setServiceBlockCookType (PDG_ServiceBlockCookType cook_type)
 Sets the service block cook type for this node. More...
 
void setRequiresGeneratedInputs (bool requires_all)
 
void setRequiresCookedInputs (bool requires_cooked)
 
void setRequiresEndBlock (bool requires_block)
 
void setRequiresSceneFile (bool requires_scene)
 Indicates whether or not this node requires the current scene file. More...
 
void setRequiresInputData (bool requires_data)
 
void setIsCompressWorkItemData (bool compress)
 
void setIsAlwaysRegenerate (bool always_regenerate)
 
void setDirtyOnRegenerate (bool dirty_node)
 
void setDirtyOnIncomplete (bool dirty_node)
 
void setClearFailures (bool clear_failures)
 
void setAllowDuplicateOutputs (bool allow_dupes)
 
void setUsesSharedServers (bool uses_servers)
 
void setUsesDynamicBatching (bool uses_batching)
 
void setIsValid (bool is_valid)
 Sets the valid flag. More...
 
const UT_StringHolderserviceName () const
 
bool hasServiceName () const
 Returns true if a service name has been set. More...
 
void setServiceName (const UT_StringHolder &name)
 Sets the service name. More...
 
void setOutputAttrib (const UT_StringHolder &name, int origin)
 
void setInputAttrib (const UT_StringHolder &name, int origin)
 
void setPortOrigin (const UT_StringHolder &name, int origin)
 
void setOutputAttribDefault (int origin)
 Sets the default origin for the attribute type. More...
 
void setInputAttribDefault (int origin)
 
const PDG_AttributeInfo::ConfigoutputAttribs () const
 Returns the current output attribute origin map. More...
 
const PDG_AttributeInfo::ConfiginputAttribs () const
 
const UT_ArrayStringMap< int > & portOrigins () const
 Returns the evaluation origin overrides for ports on this instance. More...
 
void reset (const PDG_NodeInterface *node_template, const PDG_Node *node_instance)
 Resets the node options back to their default values. More...
 

Detailed Description

Configuration options for a node instance, based on the current parms of the node before a cook begins. Filled in by the onConfigureNode callback.

Examples:
PDG/PDG_ProcessorRandom.C, and PDG/PDG_ProcessorRandom.h.

Definition at line 30 of file PDG_NodeOptions.h.

Member Typedef Documentation

Constructor & Destructor Documentation

PDG_NodeOptions::PDG_NodeOptions ( )
inline

Definition at line 36 of file PDG_NodeOptions.h.

Member Function Documentation

bool PDG_NodeOptions::allowDuplicateOutputs ( ) const
inline

Returns true if the the node should allow multiple work items to have the same output file

Definition at line 138 of file PDG_NodeOptions.h.

const UT_StringHolder& PDG_NodeOptions::description ( ) const
inline

Returns the UI description for the node, based on the current parms. The string is filled out by the onConfigureNode callback, based on the state of the node.

Definition at line 74 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::filterState ( PDG_WorkItemState  state) const
inline

Returns true if the state filter contains the specified state.

Definition at line 65 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::filterState ( const PDG_WorkItem work_item) const

Returns true if the node can generate from the specified work item.

bool PDG_NodeOptions::hasDescription ( ) const
inline

Returns true if a description has been set.

Definition at line 78 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::hasServiceName ( ) const
inline

Returns true if a service name has been set.

Definition at line 243 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::hasStateFilter ( ) const
inline

Returns true if the node has at least one state in its state filter.

Definition at line 61 of file PDG_NodeOptions.h.

const PDG_AttributeInfo::Config& PDG_NodeOptions::inputAttribs ( ) const
inline

Definition at line 296 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::isAlwaysRegenerate ( ) const
inline

Returns true if the node should always regenerate work items each cook

Definition at line 118 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::isClearFailures ( ) const
inline

Returns true iof the node should reset failure states back to success, when generating from failed nputs.

Definition at line 133 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::isCompressWorkItemData ( ) const
inline

Returns true if this node supports compression of work item .json data for out of process tasks.

Definition at line 113 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::isDirtyOnIncomplete ( ) const
inline

Returns true if the node should dirty itself on the next cook, if it has any uncooked work items

Definition at line 128 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::isDirtyOnRegenerate ( ) const
inline

Returns true if the node should always dirty itself when regenerating work items.

Definition at line 123 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::isValid ( ) const
inline

Returns true if the node options are valid.

Definition at line 150 of file PDG_NodeOptions.h.

const PDG_AttributeInfo::Config& PDG_NodeOptions::outputAttribs ( ) const
inline

Returns the current output attribute origin map.

Definition at line 292 of file PDG_NodeOptions.h.

const UT_ArrayStringMap<int>& PDG_NodeOptions::portOrigins ( ) const
inline

Returns the evaluation origin overrides for ports on this instance.

Definition at line 301 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::requiresCookedInputs ( ) const
inline

Returns true if the node requires input work items to be cooked. Unliked requiresGeneratedInputs, this does not necessarily mean the node waits for ALL inputs – it just makes it dynamic.

Definition at line 94 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::requiresEndBlock ( ) const
inline

Returns true if this node requires an end block to cook correctly.

Definition at line 98 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::requiresGeneratedInputs ( ) const
inline

Returns true if the node requires all input work items to be generated before it can generate.

Definition at line 88 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::requiresInputData ( ) const
inline

Returns true if the node reads input file data during work item generation, instead of just using the file path

Definition at line 108 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::requiresSceneFile ( ) const
inline

Returns true if this node requires the scene file (e.g. a .hip) to cook correctly.

Definition at line 103 of file PDG_NodeOptions.h.

void PDG_NodeOptions::reset ( const PDG_NodeInterface node_template,
const PDG_Node node_instance 
)

Resets the node options back to their default values.

PDG_ServiceBlockCookType PDG_NodeOptions::serviceBlockCookType ( ) const
inline

Returns the service block cook type for this node.

Definition at line 83 of file PDG_NodeOptions.h.

const UT_StringHolder& PDG_NodeOptions::serviceName ( ) const
inline

Returns the service name for the node The string is filled out by the onConfigureNode callback

Definition at line 239 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setAllowDuplicateOutputs ( bool  allow_dupes)
inline

Indicates whether or not the work items in the node should be allowed to have duplicate output files

Definition at line 220 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setClearFailures ( bool  clear_failures)
inline

Indicates whether or not the node should clear failure states when the state filter is configured to include failed work items

Definition at line 215 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setDescription ( const UT_StringHolder desc)
inline

Sets the UI description for the node.

Definition at line 158 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setDirtyOnIncomplete ( bool  dirty_node)
inline

Indicates whether or not the node should always dirty itself if it has incomplete work items

Definition at line 210 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setDirtyOnRegenerate ( bool  dirty_node)
inline

Indicates whether or not the node should always dirty if it requires regeneration.

Definition at line 205 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setInputAttrib ( const UT_StringHolder name,
int  origin 
)
inline

Definition at line 264 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setInputAttribDefault ( int  origin)
inline

Definition at line 287 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setIsAlwaysRegenerate ( bool  always_regenerate)
inline

Indicates whether or not the node should regenerate work items every cook. If the node has a custom onRegenerate implementation it will always be called – this option is only for nodes that don't define their own implementation.

Definition at line 200 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setIsCompressWorkItemData ( bool  compress)
inline

Indicates whether or not work items created by this node should store compressed .json data when running out of process.

Definition at line 193 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setIsValid ( bool  is_valid)
inline

Sets the valid flag.

Definition at line 234 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setOutputAttrib ( const UT_StringHolder name,
int  origin 
)
inline

Adds an attribute name and origin type to the attribute origin map. This should be used for instant-specific attributes, which differ from the ones in the node template. The origin can be the ORed value of an of the enum entries in PDG_AttributeInfo::AttribOrigin.

Definition at line 255 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setOutputAttribDefault ( int  origin)
inline

Sets the default origin for the attribute type.

Definition at line 285 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setPortOrigin ( const UT_StringHolder name,
int  origin 
)
inline

Updates the evaluation origin for a port on this specific node instance

Definition at line 276 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setRequiresCookedInputs ( bool  requires_cooked)
inline

Indicates whether or not the node requires inputs to be cooked before it can generate.

Definition at line 173 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setRequiresEndBlock ( bool  requires_block)
inline

Indicates whether or not this node requires an end block in order to cook properly. This only applies to feedback begin nodes.

Definition at line 178 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setRequiresGeneratedInputs ( bool  requires_all)
inline

Indicates whether or not the node requires all inputs to be generated before it can generate.

Definition at line 168 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setRequiresInputData ( bool  requires_data)
inline

Indicates whether or not this node needs to read input file data when generating work items

Definition at line 188 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setRequiresSceneFile ( bool  requires_scene)
inline

Indicates whether or not this node requires the current scene file.

Definition at line 182 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setServiceBlockCookType ( PDG_ServiceBlockCookType  cook_type)
inline

Sets the service block cook type for this node.

Definition at line 162 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setServiceName ( const UT_StringHolder name)
inline

Sets the service name.

Definition at line 248 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setStateFilter ( const StateFilter filter)
inline

Sets the state filter.

Definition at line 154 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setUsesDynamicBatching ( bool  uses_batching)
inline

Indicates whether or not this node creates work items that use dynamic batching

Definition at line 230 of file PDG_NodeOptions.h.

void PDG_NodeOptions::setUsesSharedServers ( bool  uses_servers)
inline

Indicates whether or not this node creates work items that use shared servers

Definition at line 225 of file PDG_NodeOptions.h.

const StateFilter& PDG_NodeOptions::stateFilter ( ) const
inline

Returns the work item state filter for the node. An empty filter means the node will generate from all successful work items, and not generate from any failed items.

Definition at line 57 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::usesDynamicBatching ( ) const
inline

Returns true if thise node creates work items that use dynamic batching.

Definition at line 146 of file PDG_NodeOptions.h.

bool PDG_NodeOptions::usesSharedServers ( ) const
inline

Returns true if this node creates work items that use shared servers.

Definition at line 142 of file PDG_NodeOptions.h.


The documentation for this class was generated from the following file: