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 } |
Static Public Member Functions | |
static void | clearOperatorHelpCache () |
static int | loadFromOpType (const char *fname, const char *savedir) |
static int | uninstallOpType (const char *path, const char *tablename, const char *opname, const char *indexpath, const char *indexfile) |
static void | removeHelpCardOverrides (UT_FileUtil *fu, const char *path, const char *tablename, const char *opname, int flags) |
static void | removeRenameOverrides (UT_FileUtil *fu, const char *path, const char *tablename, const char *opname, int flags) |
static void | removeIconOverrides (UT_FileUtil *fu, const char *path, const char *tablename, const char *opname, int flags) |
static void | removeCmdOverrides (UT_FileUtil *fu, const char *path, const char *tablename, const char *opname, int flags) |
static void | getDefaultIconName (const char *tablename, const char *opname, UT_String &iconname) |
static const char * | getCurrentPythonModuleKey () |
static const OP_Operator * | mapSecurityKeyToOperator (const char *key) |
static void | registerPythonModuleKeyClient (void *client) |
static bool | verifyPythonModuleKeyClient (const OP_Operator *op, void *client) |
static PRM_Template * | getEmptyTemplateList () |
static int | operatorNameCompare (const OP_Operator *a, const OP_Operator *b) |
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 142 of file OP_Operator.h.
Enumerator | |
---|---|
OP_COMPARE_GEN_ENGLISH | |
OP_COMPARE_GEN_NAME | |
OP_COMPARE_ENGLISH | |
OP_COMPARE_NAME |
Definition at line 542 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 525 of file OP_Operator.h.
void OP_Operator::changeParmTemplate | ( | PRM_Template * | tp | ) |
void OP_Operator::clearEventScriptPathCache | ( | ) |
|
inlinestatic |
Definition at line 272 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 529 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 455 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 450 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 |
UT_StringHolder OP_Operator::getContentsSection | ( | ) |
|
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 232 of file OP_Operator.h.
|
inline |
Definition at line 305 of file OP_Operator.h.
|
inline |
Definition at line 307 of file OP_Operator.h.
|
inlinevirtual |
Definition at line 237 of file OP_Operator.h.
const char* OP_Operator::getIconName | ( | ) | const |
|
inline |
Definition at line 281 of file OP_Operator.h.
|
inline |
Definition at line 279 of file OP_Operator.h.
|
inline |
Accessing operator inputs name, label, and reference flag.
Definition at line 565 of file OP_Operator.h.
|
inline |
Definition at line 598 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 562 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 559 of file OP_Operator.h.
|
inline |
Definition at line 295 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 509 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 | ( | ) |
const UT_StringHolder& OP_Operator::getMessageSubNodes | ( | ) | const |
|
inline |
Definition at line 293 of file OP_Operator.h.
|
inline |
Definition at line 220 of file OP_Operator.h.
int OP_Operator::getNumActiveNodes | ( | ) | const |
|
inlinevirtual |
Definition at line 458 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 206 of file OP_Operator.h.
|
inlinevirtual |
Reimplemented in SHOP_Operator, DOP_Operator, VOP_ScriptOperator, and VOP_Operator.
Definition at line 208 of file OP_Operator.h.
|
virtual |
const UT_StringHolder& OP_Operator::getOriginalName | ( | ) | const |
void OP_Operator::getOriginalTableAndName | ( | UT_WorkBuffer & | name | ) | const |
Get the op table name and the unoverridden 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"
|
inline |
Definition at line 312 of file OP_Operator.h.
bool OP_Operator::getOTLHelp | ( | UT_String & | str | ) |
|
inline |
Definition at line 328 of file OP_Operator.h.
FS_IndexFileHandle OP_Operator::getOTLIndexFilePtr | ( | bool | check_timestamp = true | ) |
|
inline |
Definition at line 318 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 571 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 724 of file OP_Operator.h.
Reimplemented in PI_ScriptOperator.
Definition at line 579 of file OP_Operator.h.
|
inline |
Definition at line 291 of file OP_Operator.h.
|
inline |
Definition at line 299 of file OP_Operator.h.
|
inline |
Definition at line 287 of file OP_Operator.h.
|
inline |
Definition at line 283 of file OP_Operator.h.
|
inline |
Definition at line 285 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 227 of file OP_Operator.h.
Definition at line 229 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 473 of file OP_Operator.h.
|
inline |
Definition at line 472 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 289 of file OP_Operator.h.
|
inline |
Definition at line 736 of file OP_Operator.h.
|
inline |
Definition at line 730 of file OP_Operator.h.
bool OP_Operator::hasContentsSection | ( | ) |
|
inline |
Definition at line 502 of file OP_Operator.h.
|
virtual |
Reimplemented in OP_ScriptOperator.
|
inline |
Definition at line 726 of file OP_Operator.h.
|
inline |
Definition at line 738 of file OP_Operator.h.
|
inline |
Definition at line 732 of file OP_Operator.h.
|
inline |
Definition at line 521 of file OP_Operator.h.
bool OP_Operator::hasPotentialEditableSubNodes | ( | ) |
Returns true if the editable subnodes pattern isn't empty It may or may not match any actual nodes.
|
virtual |
void OP_Operator::informOfTabMenuFlagChange | ( | ) |
bool OP_Operator::isBlackBoxed | ( | ) |
Returns true if this operator is black boxed, and false otherwise.
|
inline |
Definition at line 517 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 513 of file OP_Operator.h.
bool OP_Operator::isCustomDSO | ( | ) | const |
|
inline |
Definition at line 481 of file OP_Operator.h.
|
inline |
Definition at line 494 of file OP_Operator.h.
|
inline |
Definition at line 477 of file OP_Operator.h.
|
inline |
Definition at line 498 of file OP_Operator.h.
|
inline |
Definition at line 485 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 754 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.
|
static |
|
protectedvirtual |
Reimplemented in OP_ScriptOperator.
void OP_Operator::loadPythonModuleSection | ( | bool | force = false | ) |
OP_SpareParms* OP_Operator::loadSpareParms | ( | UT_IStream & | is | ) |
void OP_Operator::loadViewerHandleModuleSection | ( | bool | force = false | ) |
void OP_Operator::loadViewerStateModuleSection | ( | bool | force = false | ) |
|
static |
|
inline |
Definition at line 386 of file OP_Operator.h.
|
inlinevirtual |
Reimplemented in DOP_Operator, VOP_ScriptOperator, SHOP_Operator, and VOP_Operator.
Definition at line 417 of file OP_Operator.h.
|
inline |
Definition at line 384 of file OP_Operator.h.
|
protected |
|
protected |
|
protected |
|
inline |
The number of ordered inputs on a node that remain separate even on nodes that have a variable number of inputs. These separate inputs always start at the beginning (variable input connectors are always last).
Definition at line 396 of file OP_Operator.h.
|
inlinestatic |
Definition at line 777 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 | ( | ) |
void OP_Operator::setDefinition | ( | const char * | def | ) |
|
inlineprotected |
Definition at line 800 of file OP_Operator.h.
void OP_Operator::setEnglish | ( | const char * | english | ) |
void OP_Operator::setIconName | ( | const char * | name | ) |
void OP_Operator::setInputDataEditorConfig | ( | const OP_InputDataEditorConfig & | config | ) |
|
inline |
Definition at line 600 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 759 of file OP_Operator.h.
void OP_Operator::setLegacyInputsMap | ( | const char * | map | ) |
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".
|
virtual |
The number of ordered inputs on a node that remain separate even on nodes that have a variable number of inputs. These separate inputs always start at the beginning (variable input connectors are always last).
Definition at line 394 of file OP_Operator.h.
|
inline |
Definition at line 460 of file OP_Operator.h.
void OP_Operator::setOpTabSubMenuPath | ( | const char * | tab_submenu_path | ) |
void OP_Operator::setOTLDefinition | ( | const OP_OTLDefinition & | definition | ) |
|
inline |
Definition at line 316 of file OP_Operator.h.
|
inline |
Definition at line 301 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 537 of file OP_Operator.h.
|
static |
|
inline |
Definition at line 490 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 949 of file OP_Operator.h.
|
friend |
Definition at line 951 of file OP_Operator.h.
|
friend |
Definition at line 950 of file OP_Operator.h.
|
protected |
Definition at line 826 of file OP_Operator.h.
|
protected |
Definition at line 825 of file OP_Operator.h.
|
protected |
Definition at line 836 of file OP_Operator.h.
|
protected |
Definition at line 842 of file OP_Operator.h.
|
protected |
Definition at line 843 of file OP_Operator.h.
|
protected |
Definition at line 822 of file OP_Operator.h.
|
protected |
Definition at line 839 of file OP_Operator.h.
|
protected |
Definition at line 830 of file OP_Operator.h.
|
protected |
Definition at line 829 of file OP_Operator.h.
|
protected |
Definition at line 833 of file OP_Operator.h.
|
protected |
Definition at line 824 of file OP_Operator.h.
|
protected |
Definition at line 823 of file OP_Operator.h.
|
protected |
Definition at line 835 of file OP_Operator.h.
|
protected |
Definition at line 828 of file OP_Operator.h.
|
protected |
Definition at line 838 of file OP_Operator.h.
|
protected |
Definition at line 831 of file OP_Operator.h.
|
protected |
Definition at line 844 of file OP_Operator.h.
|
protected |
Definition at line 852 of file OP_Operator.h.
|
protected |
Definition at line 821 of file OP_Operator.h.
|
protected |
Definition at line 827 of file OP_Operator.h.
|
protected |
Definition at line 841 of file OP_Operator.h.
|
protected |
Definition at line 832 of file OP_Operator.h.
|
protected |
Definition at line 834 of file OP_Operator.h.
|
protected |
Definition at line 840 of file OP_Operator.h.