9 #ifndef __PDG_NODE_OPTIONS_H__
10 #define __PDG_NODE_OPTIONS_H__
37 : myServiceBlockCookType(
39 , myRequiresGeneratedInputs(false)
40 , myRequiresCookedInputs(false)
41 , myRequiresEndBlock(false)
42 , myRequiresSceneFile(false)
43 , myRequiresInputData(false)
44 , myIsCompressWorkItemData(true)
45 , myIsAlwaysRegenerate(false)
46 , myIsDirtyOnRegenerate(false)
47 , myIsDirtyOnIncomplete(false)
48 , myIsClearFailures(false)
49 , myAllowDuplicateOutputs(false)
50 , myUsesSharedServers(false)
51 , myUsesDynamicBatching(false)
58 {
return myStateFilter; }
62 {
return (myStateFilter.size() > 0); }
66 {
return (myStateFilter.find(state) >= 0); }
75 {
return myDescription; }
79 {
return myDescription.isstring() &&
80 !myDescription.isEmpty(); }
84 {
return myServiceBlockCookType; }
89 {
return myRequiresGeneratedInputs; }
95 {
return myRequiresCookedInputs; }
99 {
return myRequiresEndBlock; }
104 {
return myRequiresSceneFile; }
109 {
return myRequiresInputData; }
114 {
return myIsCompressWorkItemData; }
119 {
return myIsAlwaysRegenerate; }
124 {
return myIsDirtyOnRegenerate; }
129 {
return myIsDirtyOnIncomplete; }
134 {
return myIsClearFailures; }
139 {
return myAllowDuplicateOutputs; }
143 {
return myUsesSharedServers; }
147 {
return myUsesDynamicBatching; }
151 {
return myIsValid; }
155 { myStateFilter =
filter; }
159 { myDescription = desc; }
164 { myServiceBlockCookType = cook_type; }
169 { myRequiresGeneratedInputs = requires_all; }
174 { myRequiresCookedInputs = requires_cooked; }
179 { myRequiresEndBlock = requires_block; }
183 { myRequiresSceneFile = requires_scene; }
189 { myRequiresInputData = requires_data; }
194 { myIsCompressWorkItemData = compress; }
201 { myIsAlwaysRegenerate = always_regenerate; }
206 { myIsDirtyOnRegenerate = dirty_node; }
211 { myIsDirtyOnIncomplete = dirty_node; }
216 { myIsClearFailures = clear_failures; }
221 { myAllowDuplicateOutputs = allow_dupes; }
226 { myUsesSharedServers = uses_servers; }
231 { myUsesDynamicBatching = uses_batching; }
235 { myIsValid = is_valid; }
240 {
return myServiceName; }
244 {
return myServiceName.isstring() &&
245 !myServiceName.isEmpty(); }
249 { myServiceName =
name; }
262 myOutputAttribs.myOrigins[
name] = origin;
271 myInputAttribs.myOrigins[
name] = origin;
281 myPortOrigins[
name] = origin;
286 { myOutputAttribs.myDefaultOrigin = origin; }
288 { myInputAttribs.myDefaultOrigin = origin; }
293 {
return myOutputAttribs; }
297 {
return myInputAttribs; }
302 {
return myPortOrigins; }
313 StateFilter myStateFilter;
319 bool myRequiresGeneratedInputs;
320 bool myRequiresCookedInputs;
321 bool myRequiresEndBlock;
322 bool myRequiresSceneFile;
323 bool myRequiresInputData;
325 bool myIsCompressWorkItemData;
327 bool myIsAlwaysRegenerate;
328 bool myIsDirtyOnRegenerate;
329 bool myIsDirtyOnIncomplete;
330 bool myIsClearFailures;
332 bool myAllowDuplicateOutputs;
334 bool myUsesSharedServers;
335 bool myUsesDynamicBatching;
Only overwrite the attribute if the type matches.
bool usesSharedServers() const
Returns true if this node creates work items that use shared servers.
bool hasServiceName() const
Returns true if a service name has been set.
const PDG_AttributeInfo::Config & inputAttribs() const
void setOutputAttrib(const UT_StringHolder &name, int origin)
const UT_StringHolder & description() const
void setServiceBlockCookType(PDG_ServiceBlockCookType cook_type)
Sets the service block cook type for this node.
bool isCompressWorkItemData() const
bool requiresGeneratedInputs() const
const UT_ArrayStringMap< int > & portOrigins() const
Returns the evaluation origin overrides for ports on this instance.
void setRequiresCookedInputs(bool requires_cooked)
void setInputAttrib(const UT_StringHolder &name, int origin)
bool isEmpty() const
Same as !isstring()
static bool validName(const UT_StringHolder &str, bool allow_internal=false)
bool isDirtyOnIncomplete() const
void setInputAttribDefault(int origin)
bool requiresInputData() const
bool hasDescription() const
Returns true if a description has been set.
void setAllowDuplicateOutputs(bool allow_dupes)
bool isClearFailures() const
bool isAlwaysRegenerate() const
PDG_WorkItemState
Enum of possible work item states.
bool allowDuplicateOutputs() const
void setDirtyOnRegenerate(bool dirty_node)
bool isValid() const
Returns true if the node options are valid.
void setRequiresInputData(bool requires_data)
bool filterState(PDG_WorkItemState state) const
Returns true if the state filter contains the specified state.
void setOutputAttribDefault(int origin)
Sets the default origin for the attribute type.
bool requiresSceneFile() const
void setIsValid(bool is_valid)
Sets the valid flag.
const StateFilter & stateFilter() const
bool usesDynamicBatching() const
Returns true if thise node creates work items that use dynamic batching.
GLuint const GLchar * name
void setDirtyOnIncomplete(bool dirty_node)
PDG_ServiceBlockCookType serviceBlockCookType() const
Returns the service block cook type for this node.
void setDescription(const UT_StringHolder &desc)
Sets the UI description for the node.
bool requiresEndBlock() const
Returns true if this node requires an end block to cook correctly.
void setClearFailures(bool clear_failures)
void setRequiresEndBlock(bool requires_block)
void setIsCompressWorkItemData(bool compress)
const PDG_AttributeInfo::Config & outputAttribs() const
Returns the current output attribute origin map.
void setRequiresSceneFile(bool requires_scene)
Indicates whether or not this node requires the current scene file.
void setRequiresGeneratedInputs(bool requires_all)
void setPortOrigin(const UT_StringHolder &name, int origin)
bool hasStateFilter() const
Returns true if the node has at least one state in its state filter.
void setServiceName(const UT_StringHolder &name)
Sets the service name.
void setUsesDynamicBatching(bool uses_batching)
void setUsesSharedServers(bool uses_servers)
void setIsAlwaysRegenerate(bool always_regenerate)
bool isDirtyOnRegenerate() const
SYS_FORCE_INLINE bool isstring() const
bool requiresCookedInputs() const
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
void setStateFilter(const StateFilter &filter)
Sets the state filter.
const UT_StringHolder & serviceName() const
PDG_ServiceBlockCookType
Enumeration of service block cook modes.