HDK
|
#include <OP_Operator.h>
Public Types | |
enum | OP_OperatorCompare { OP_COMPARE_GEN_ENGLISH = 0, OP_COMPARE_GEN_NAME = 1, OP_COMPARE_ENGLISH = 2, OP_COMPARE_NAME = 3 } |
Protected Member Functions | |
void | notifyUpdateTemplatesSinksOfUpdate () |
void | notifyUpdateTemplatesSinksOfDelete () |
void | notifyActiveNodesOfTemplatesUpdate () |
void | setDescriptiveParmName (const UT_StringHolder &parm) |
void | dirtyParmTemplatesLoaded () |
virtual bool | loadParmTemplatesSubclass () |
bool | loadAndCreateLayoutParmTemplates (PRM_ScriptPage *page, DS_Stream &ds_is, PRM_Template *&base_tplates, PRM_Template *&layout_tplates, PRM_ScriptImports *&imports, PRM_Template *&tplates, int base_controls_switcher_index, int base_controls_insert_index, int base_controls_switcher_page_num, PRM_Default *&base_controls_switcher_defaults, bool hide_default_parms) |
Load parameter templates from the specified file stream. More... | |
Static Protected Member Functions | |
static PRM_Template * | addTemplates (OP_TemplatePair *) |
static CH_LocalVariable * | addVariables (OP_VariablePair *, int &) |
Friends | |
class | OP_OperatorTable |
class | SHOP_ScriptOperator |
class | OP_UpdateTemplatesSink |
Definition at line 139 of file OP_Operator.h.
Enumerator | |
---|---|
OP_COMPARE_GEN_ENGLISH | |
OP_COMPARE_GEN_NAME | |
OP_COMPARE_ENGLISH | |
OP_COMPARE_NAME |
Definition at line 511 of file OP_Operator.h.
OP_Operator::OP_Operator | ( | const char * | name, |
const char * | english, | ||
OP_Constructor | construct, | ||
PRM_Template * | templates, | ||
unsigned | min_sources, | ||
unsigned | max_sources = 9999 , |
||
CH_LocalVariable * | variables = 0 , |
||
unsigned | flags = 0 , |
||
const char ** | inputlabels = 0 , |
||
int | maxoutputs = 1 , |
||
const char * | tab_submenu_path = 0 |
||
) |
Note: The 'inputlabels' array is expected to be null-terminated.
OP_Operator::OP_Operator | ( | const char * | name, |
const char * | english, | ||
OP_Constructor | construct, | ||
OP_TemplatePair * | template_pair, | ||
unsigned | min_sources, | ||
unsigned | max_sources = 9999 , |
||
OP_VariablePair * | variable_pair = 0 , |
||
unsigned | flags = 0 , |
||
const char ** | inputlabels = 0 , |
||
int | maxoutputs = 1 , |
||
const char * | tab_submenu_path = 0 |
||
) |
OP_Operator::OP_Operator | ( | const char * | name, |
const char * | english, | ||
OP_Constructor | construct, | ||
PRM_Template * | templates, | ||
const char * | child_table_name, | ||
unsigned | min_sources, | ||
unsigned | max_sources = 9999 , |
||
CH_LocalVariable * | variables = 0 , |
||
unsigned | flags = 0 , |
||
const char ** | inputlabels = 0 , |
||
int | maxoutputs = 1 , |
||
const char * | tab_submenu_path = 0 |
||
) |
OP_Operator::OP_Operator | ( | const char * | name, |
const char * | english, | ||
OP_Constructor | construct, | ||
OP_TemplatePair * | template_pair, | ||
const char * | child_table_name, | ||
unsigned | min_sources, | ||
unsigned | max_sources = 9999 , |
||
OP_VariablePair * | variable_pair = 0 , |
||
unsigned | flags = 0 , |
||
const char ** | inputlabels = 0 , |
||
int | maxoutputs = 1 , |
||
const char * | tab_submenu_path = 0 |
||
) |
|
virtual |
|
staticprotected |
|
staticprotected |
|
virtual |
Accessing operator inputs name, label, and reference flag.
|
inline |
Definition at line 494 of file OP_Operator.h.
void OP_Operator::changeParmTemplate | ( | PRM_Template * | tp | ) |
void OP_Operator::clearEventScriptPathCache | ( | ) |
|
inlinestatic |
Definition at line 257 of file OP_Operator.h.
|
virtual |
Reimplemented in OP_ScriptOperator.
|
virtual |
Reimplemented in SHOP_Operator.
void OP_Operator::constructIndexFileSectionPath | ( | UT_String & | path, |
const char * | opdef_or_oplib, | ||
const char * | section_name | ||
) | const |
Returns a path that refers to an index file section within an OTL library or an HDA definition (depending on opdef_or_oplib prefix, which should be either OTL_LIBRARY_PREFIX or OTL_DEFINITION_PREFIX). The method version that takes a string array instead of a string is intended for nested sections where the sections towards the end of the array are innermost sections within sections earlier in the array (that are themselves index files). For example, the path may be "opdef:/Object/hda?section" or "opdef:/artistA::Object/hda::2.0?section, or "opdef:/Sop/hda?outer_section.idx?inner_section, etc
void OP_Operator::constructIndexFileSectionPath | ( | UT_String & | path, |
const char * | opdef_or_oplib, | ||
const UT_StringArray & | section_names | ||
) | const |
Returns a path that refers to an index file section within an OTL library or an HDA definition (depending on opdef_or_oplib prefix, which should be either OTL_LIBRARY_PREFIX or OTL_DEFINITION_PREFIX). The method version that takes a string array instead of a string is intended for nested sections where the sections towards the end of the array are innermost sections within sections earlier in the array (that are themselves index files). For example, the path may be "opdef:/Object/hda?section" or "opdef:/artistA::Object/hda::2.0?section, or "opdef:/Sop/hda?outer_section.idx?inner_section, etc
OP_Node* OP_Operator::constructNode | ( | OP_Network * | net, |
const char * | name | ||
) |
FS_IndexFile* OP_Operator::createDefaultOTLIndexFile | ( | ) | const |
FS_IndexFile* OP_Operator::createOTLIndexFile | ( | bool | reservedsectionsonly, |
UT_StringArray * | externalfiles | ||
) |
|
protected |
|
inline |
Definition at line 498 of file OP_Operator.h.
void OP_Operator::fillInfoTree | ( | UT_InfoTree & | tree, |
const OP_NodeInfoTreeParms & | parms | ||
) |
Fill in 'tree' with details that are common to all operator types. Then call fillInfoTreeOperatorSpecific() to get specific details about this specific operator
|
virtual |
Triggered by 'fillInfoTree()', this virtual function adds all operator- specific info to 'tree'. All child classes must create their own branches under 'tree' to place their info
Reimplemented in OP_ScriptOperator.
|
virtual |
Reimplemented in OP_ScriptOperator.
|
inline |
Returns the parm templates that are base to the final parameter layout if the layout is overridden by a custom dialog script. Returns nullptr if the parameter layout is not overridden.
Definition at line 424 of file OP_Operator.h.
|
inlinevirtual |
Exists only for script/HDA operators. Returns the parm templates that are base to the HDA parameters.
Reimplemented in VOP_ScriptOperator.
Definition at line 419 of file OP_Operator.h.
void OP_Operator::getCachedEventScriptPaths | ( | UT_StringArray & | events, |
UT_StringArray & | paths, | ||
bool | only_nonempty | ||
) | const |
OP_OperatorTable* OP_Operator::getChildOperatorTable | ( | ) | const |
const UT_StringHolder& OP_Operator::getChildTableName | ( | ) | const |
|
static |
|
virtual |
|
static |
|
virtual |
OP_Node* OP_Operator::getDefiningNetwork | ( | ) | const |
Returns an official name of the library section that contains the HDA definition eg "Object/hda".
|
static |
|
inline |
Definition at line 220 of file OP_Operator.h.
|
inline |
Definition at line 290 of file OP_Operator.h.
|
inlinevirtual |
Definition at line 225 of file OP_Operator.h.
const char* OP_Operator::getIconName | ( | ) | const |
|
inline |
Definition at line 266 of file OP_Operator.h.
|
inline |
Definition at line 264 of file OP_Operator.h.
Accessing operator inputs name, label, and reference flag.
Definition at line 534 of file OP_Operator.h.
|
inline |
Definition at line 567 of file OP_Operator.h.
bool OP_Operator::getInputIsReference | ( | int | idx | ) | const |
Accessing operator inputs name, label, and reference flag.
const UT_StringHolder& OP_Operator::getInputLabel | ( | int | idx | ) | const |
Accessing operator inputs name, label, and reference flag.
|
inline |
Accessing operator inputs name, label, and reference flag.
Definition at line 531 of file OP_Operator.h.
const UT_StringHolder& OP_Operator::getInputName | ( | int | idx | ) | const |
Accessing operator inputs name, label, and reference flag.
|
inline |
Accessing operator inputs name, label, and reference flag.
Definition at line 528 of file OP_Operator.h.
|
inline |
Definition at line 280 of file OP_Operator.h.
|
inline |
Test to see if this is the primary "subnet" operator for the table. This is the operator type which is used as a default container for nodes. There should only be one of these defined.
Definition at line 478 of file OP_Operator.h.
PRM_ScriptImports* OP_Operator::getLayoutParmTemplateImports | ( | ) |
PRM_Template* OP_Operator::getLayoutParmTemplates | ( | ) |
Returns the operator's parameter templates in their final parameter layout. This can return nullptr if the operator is not a script/HDA / operator and if the operator's parameter layout is not overridden by a custom dialog script.
const UT_StringArray* OP_Operator::getLegacyInputsIndexMap | ( | ) | const |
Sets an array that maps an old input index to a new input name. It is used for handling legacy H11 hip files, where nodes were saved with indices only. If an operator definition is changed (ie, inputs get inserted or reordered), it is necessary to provide this mapping, to be able to load legacy hip files. If op definition does not change, there is no need to define this mapping, since the default assignment of input index will still work. Also it is not needed for handling newer hip files that save the input name information and can handle input order change in new op definition. The map is given as a sequence of input names eg "name1 name2".
Sets an array that maps an old input index to a new input name. It is used for handling legacy H11 hip files, where nodes were saved with indices only. If an operator definition is changed (ie, inputs get inserted or reordered), it is necessary to provide this mapping, to be able to load legacy hip files. If op definition does not change, there is no need to define this mapping, since the default assignment of input index will still work. Also it is not needed for handling newer hip files that save the input name information and can handle input order change in new op definition. The map is given as a sequence of input names eg "name1 name2".
OP_OTLLicenseType OP_Operator::getLicense | ( | ) |
|
inline |
Definition at line 278 of file OP_Operator.h.
|
inline |
Definition at line 208 of file OP_Operator.h.
int OP_Operator::getNumActiveNodes | ( | ) | const |
|
inlinevirtual |
Definition at line 427 of file OP_Operator.h.
Returns a file name corresponding to the operator name. In most cases, the file name is the same as the operator name, but since it has to be acceptable by all file systems, some invalid characters may be converted to dashes (eg, the namespace semicolons which cause problems on Windows).
void OP_Operator::getOpBasedFileName | ( | UT_WorkBuffer & | filename | ) |
Returns a file name corresponding to the operator name. In most cases, the file name is the same as the operator name, but since it has to be acceptable by all file systems, some invalid characters may be converted to dashes (eg, the namespace semicolons which cause problems on Windows).
|
virtual |
Reimplemented in OP_ScriptOperator.
|
virtual |
Reimplemented in OP_ScriptOperator, and DOP_Operator.
|
virtual |
|
inlinevirtual |
Reimplemented in SHOP_Operator, DOP_Operator, VOP_ScriptOperator, and VOP_Operator.
Definition at line 203 of file OP_Operator.h.
|
inlinevirtual |
Reimplemented in SHOP_Operator, DOP_Operator, VOP_ScriptOperator, and VOP_Operator.
Definition at line 205 of file OP_Operator.h.
|
virtual |
|
inline |
Definition at line 295 of file OP_Operator.h.
bool OP_Operator::getOTLHelp | ( | UT_String & | str | ) |
|
inline |
Definition at line 311 of file OP_Operator.h.
FS_IndexFileHandle OP_Operator::getOTLIndexFilePtr | ( | bool | check_timestamp = true | ) |
|
inline |
Definition at line 301 of file OP_Operator.h.
const UT_StringHolder& OP_Operator::getOutputLabel | ( | int | idx | ) | const |
Accessing operator outputs label.
|
inline |
Accessing operator outputs label.
Definition at line 540 of file OP_Operator.h.
bool OP_Operator::getOverrideLayoutParmTemplateFile | ( | UT_String & | ds_path | ) | const |
Pass back the file path of the .ds file that was loaded to override the operator's parameter templates. Return true if such a file was found and loaded. Return false if no .ds override file was found.
PRM_ScriptImports* OP_Operator::getParmTemplateImports | ( | ) |
PRM_Template* OP_Operator::getParmTemplates | ( | ) |
Returns the operator's parameter templates with base parameters appearing first (if they exist for script/HDA operators) followed by non-base parameters.
If getLayoutParmTemplates() returns nullptr, then getParmTemplates() can be used for the parameter layout.
unsigned OP_Operator::getPermissionMask | ( | ) | const |
PRM_PresetInfo* OP_Operator::getPresetInfo | ( | ) |
|
inline |
Definition at line 693 of file OP_Operator.h.
Reimplemented in PI_ScriptOperator.
Definition at line 548 of file OP_Operator.h.
|
inline |
Definition at line 276 of file OP_Operator.h.
|
inline |
Definition at line 284 of file OP_Operator.h.
|
inline |
Definition at line 272 of file OP_Operator.h.
|
inline |
Definition at line 268 of file OP_Operator.h.
|
inline |
Definition at line 270 of file OP_Operator.h.
void OP_Operator::getSecondaryFunctionsNames | ( | UT_StringMap< UT_StringHolder > & | functions | ) |
|
virtual |
OP_OperatorTable* OP_Operator::getTable | ( | ) | const |
|
inline |
Get the op table name and the op name concatenated together to get a unique name. Returns full name with table, including namespace and version tags if there are any, eg "artistA::table/op::2.0"
Definition at line 215 of file OP_Operator.h.
Definition at line 217 of file OP_Operator.h.
const char* OP_Operator::getTableName | ( | ) | const |
CH_LocalVariable* OP_Operator::getVariable | ( | int | i | ) | const |
CH_LocalVariable* OP_Operator::getVariable | ( | const char * | name | ) | const |
|
inline |
Definition at line 442 of file OP_Operator.h.
|
inline |
Definition at line 441 of file OP_Operator.h.
|
virtual |
For HDAs, getVersion will return the version number defined by its HDA definition, or the empty string if it does not exist. For non-HDA's (ie. native or HDK node types), it will return the Houdini version X.Y.Z.W string that we were compiled with. Subclasses may override this to provide different numbering. One of the uses of this function to determine if loading a node's parameters needs to be upgraded.
Reimplemented in DOP_AutoOperator.
|
inline |
Definition at line 274 of file OP_Operator.h.
|
inline |
Definition at line 699 of file OP_Operator.h.
bool OP_Operator::hasContentsSection | ( | ) |
|
inline |
Definition at line 471 of file OP_Operator.h.
|
virtual |
Reimplemented in OP_ScriptOperator.
|
inline |
Definition at line 695 of file OP_Operator.h.
|
inline |
Definition at line 701 of file OP_Operator.h.
|
inline |
Definition at line 490 of file OP_Operator.h.
|
virtual |
void OP_Operator::informOfTabMenuFlagChange | ( | ) |
bool OP_Operator::isBlackBoxed | ( | ) |
Returns true if this operator is black boxed, and false otherwise.
|
inline |
Definition at line 486 of file OP_Operator.h.
bool OP_Operator::isCompiled | ( | ) |
Returns true if this operator comes from a compiled OTL, false otherwise.
|
inline |
Definition at line 482 of file OP_Operator.h.
bool OP_Operator::isCustomDSO | ( | ) | const |
|
inline |
Definition at line 450 of file OP_Operator.h.
|
inline |
Definition at line 463 of file OP_Operator.h.
|
inline |
Definition at line 446 of file OP_Operator.h.
|
inline |
Definition at line 467 of file OP_Operator.h.
|
inline |
Definition at line 454 of file OP_Operator.h.
|
inline |
Is this operator type thread-safe for cooking? OP_Node::cook() calls this to determine if serialization is needed. DEFAULT: false
Definition at line 717 of file OP_Operator.h.
void OP_Operator::listContainedOperators | ( | UT_StringSet & | contents_list | ) |
List all operators found in the contents section.
|
protected |
Load parameter templates from the specified file stream.
|
protectedvirtual |
Reimplemented in OP_ScriptOperator.
void OP_Operator::loadPythonModuleSection | ( | bool | force = false | ) |
OP_SpareParms* OP_Operator::loadSpareParms | ( | UT_IStream & | is | ) |
void OP_Operator::loadViewerStateModuleSection | ( | bool | force = false | ) |
|
static |
|
inline |
Definition at line 366 of file OP_Operator.h.
|
inlinevirtual |
Reimplemented in DOP_Operator, VOP_ScriptOperator, SHOP_Operator, and VOP_Operator.
Definition at line 386 of file OP_Operator.h.
|
inline |
Definition at line 364 of file OP_Operator.h.
|
protected |
|
protected |
|
protected |
|
inlinestatic |
Definition at line 740 of file OP_Operator.h.
|
static |
|
static |
|
static |
|
static |
void OP_Operator::resetVariables | ( | OP_VariablePair * | variable_pair | ) |
bool OP_Operator::runEventScript | ( | const char * | event, |
OP_Node * | node_arg = nullptr , |
||
bool | full_path = false , |
||
UT_Options * | extra_args = nullptr , |
||
bool * | node_deleted_by_script = nullptr |
||
) |
void OP_Operator::setDefaultIconName | ( | ) |
|
inlineprotected |
Definition at line 763 of file OP_Operator.h.
void OP_Operator::setInputDataEditorConfig | ( | const OP_InputDataEditorConfig & | config | ) |
|
inline |
Definition at line 569 of file OP_Operator.h.
void OP_Operator::setIsGenerator | ( | bool | isgen | ) |
|
inline |
This function is used to specify whether a particular operator type can be cooked in a multi-threaded manner.
Definition at line 722 of file OP_Operator.h.
Sets an array that maps an old input index to a new input name. It is used for handling legacy H11 hip files, where nodes were saved with indices only. If an operator definition is changed (ie, inputs get inserted or reordered), it is necessary to provide this mapping, to be able to load legacy hip files. If op definition does not change, there is no need to define this mapping, since the default assignment of input index will still work. Also it is not needed for handling newer hip files that save the input name information and can handle input order change in new op definition. The map is given as a sequence of input names eg "name1 name2".
|
inline |
Definition at line 429 of file OP_Operator.h.
void OP_Operator::setOTLDefinition | ( | const OP_OTLDefinition & | definition | ) |
|
inline |
Definition at line 299 of file OP_Operator.h.
|
inline |
Definition at line 286 of file OP_Operator.h.
|
inline |
Returns true if the operator should be preserved by op director, when elimiating unused HDAs during a library refresh.
Definition at line 506 of file OP_Operator.h.
|
static |
|
inline |
Definition at line 459 of file OP_Operator.h.
|
virtual |
Reimplemented in VOP_ScriptOperator, and OP_ScriptOperator.
void OP_Operator::updatePresetInfo | ( | ) |
|
static |
|
virtual |
Reimplemented in VOP_ScriptOperator, DOP_Operator, SHOP_Operator, and VOP_Operator.
|
virtual |
Reimplemented in VOP_Operator.
|
virtual |
Reimplemented in VOP_ScriptOperator.
|
virtual |
Reimplemented in VOP_ScriptOperator, and VOP_Operator.
|
virtual |
Reimplemented in VOP_Operator.
|
friend |
Definition at line 904 of file OP_Operator.h.
|
friend |
Definition at line 906 of file OP_Operator.h.
|
friend |
Definition at line 905 of file OP_Operator.h.
|
protected |
Definition at line 789 of file OP_Operator.h.
|
protected |
Definition at line 788 of file OP_Operator.h.
|
protected |
Definition at line 799 of file OP_Operator.h.
|
protected |
Definition at line 805 of file OP_Operator.h.
|
protected |
Definition at line 806 of file OP_Operator.h.
|
protected |
Definition at line 785 of file OP_Operator.h.
|
protected |
Definition at line 802 of file OP_Operator.h.
|
protected |
Definition at line 793 of file OP_Operator.h.
|
protected |
Definition at line 792 of file OP_Operator.h.
|
protected |
Definition at line 796 of file OP_Operator.h.
|
protected |
Definition at line 787 of file OP_Operator.h.
|
protected |
Definition at line 786 of file OP_Operator.h.
|
protected |
Definition at line 798 of file OP_Operator.h.
|
protected |
Definition at line 791 of file OP_Operator.h.
|
protected |
Definition at line 801 of file OP_Operator.h.
|
protected |
Definition at line 794 of file OP_Operator.h.
|
protected |
Definition at line 814 of file OP_Operator.h.
|
protected |
Definition at line 784 of file OP_Operator.h.
|
protected |
Definition at line 790 of file OP_Operator.h.
|
protected |
Definition at line 804 of file OP_Operator.h.
|
protected |
Definition at line 795 of file OP_Operator.h.
|
protected |
Definition at line 797 of file OP_Operator.h.
|
protected |
Definition at line 803 of file OP_Operator.h.