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 530 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 513 of file OP_Operator.h.
void OP_Operator::changeParmTemplate | ( | PRM_Template * | tp | ) |
void OP_Operator::clearEventScriptPathCache | ( | ) |
|
inlinestatic |
Definition at line 260 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 517 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 443 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 438 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 220 of file OP_Operator.h.
|
inline |
Definition at line 293 of file OP_Operator.h.
|
inline |
Definition at line 295 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 269 of file OP_Operator.h.
|
inline |
Definition at line 267 of file OP_Operator.h.
Accessing operator inputs name, label, and reference flag.
Definition at line 553 of file OP_Operator.h.
|
inline |
Definition at line 586 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 550 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 547 of file OP_Operator.h.
|
inline |
Definition at line 283 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 497 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 281 of file OP_Operator.h.
|
inline |
Definition at line 208 of file OP_Operator.h.
int OP_Operator::getNumActiveNodes | ( | ) | const |
|
inlinevirtual |
Definition at line 446 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 300 of file OP_Operator.h.
bool OP_Operator::getOTLHelp | ( | UT_String & | str | ) |
|
inline |
Definition at line 316 of file OP_Operator.h.
FS_IndexFileHandle OP_Operator::getOTLIndexFilePtr | ( | bool | check_timestamp = true | ) |
|
inline |
Definition at line 306 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 559 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 712 of file OP_Operator.h.
Reimplemented in PI_ScriptOperator.
Definition at line 567 of file OP_Operator.h.
|
inline |
Definition at line 279 of file OP_Operator.h.
|
inline |
Definition at line 287 of file OP_Operator.h.
|
inline |
Definition at line 275 of file OP_Operator.h.
|
inline |
Definition at line 271 of file OP_Operator.h.
|
inline |
Definition at line 273 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 461 of file OP_Operator.h.
|
inline |
Definition at line 460 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 277 of file OP_Operator.h.
|
inline |
Definition at line 724 of file OP_Operator.h.
|
inline |
Definition at line 718 of file OP_Operator.h.
bool OP_Operator::hasContentsSection | ( | ) |
|
inline |
Definition at line 490 of file OP_Operator.h.
|
virtual |
Reimplemented in OP_ScriptOperator.
|
inline |
Definition at line 714 of file OP_Operator.h.
|
inline |
Definition at line 726 of file OP_Operator.h.
|
inline |
Definition at line 720 of file OP_Operator.h.
|
inline |
Definition at line 509 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 505 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 501 of file OP_Operator.h.
bool OP_Operator::isCustomDSO | ( | ) | const |
|
inline |
Definition at line 469 of file OP_Operator.h.
|
inline |
Definition at line 482 of file OP_Operator.h.
|
inline |
Definition at line 465 of file OP_Operator.h.
|
inline |
Definition at line 486 of file OP_Operator.h.
|
inline |
Definition at line 473 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 742 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::loadViewerHandleModuleSection | ( | bool | force = false | ) |
void OP_Operator::loadViewerStateModuleSection | ( | bool | force = false | ) |
|
static |
|
inline |
Definition at line 374 of file OP_Operator.h.
|
inlinevirtual |
Reimplemented in DOP_Operator, VOP_ScriptOperator, SHOP_Operator, and VOP_Operator.
Definition at line 405 of file OP_Operator.h.
|
inline |
Definition at line 372 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 384 of file OP_Operator.h.
|
inlinestatic |
Definition at line 765 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 788 of file OP_Operator.h.
void OP_Operator::setInputDataEditorConfig | ( | const OP_InputDataEditorConfig & | config | ) |
|
inline |
Definition at line 588 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 747 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".
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 382 of file OP_Operator.h.
|
inline |
Definition at line 448 of file OP_Operator.h.
void OP_Operator::setOTLDefinition | ( | const OP_OTLDefinition & | definition | ) |
|
inline |
Definition at line 304 of file OP_Operator.h.
|
inline |
Definition at line 289 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 525 of file OP_Operator.h.
|
static |
|
inline |
Definition at line 478 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 932 of file OP_Operator.h.
|
friend |
Definition at line 934 of file OP_Operator.h.
|
friend |
Definition at line 933 of file OP_Operator.h.
|
protected |
Definition at line 814 of file OP_Operator.h.
|
protected |
Definition at line 813 of file OP_Operator.h.
|
protected |
Definition at line 824 of file OP_Operator.h.
|
protected |
Definition at line 830 of file OP_Operator.h.
|
protected |
Definition at line 831 of file OP_Operator.h.
|
protected |
Definition at line 810 of file OP_Operator.h.
|
protected |
Definition at line 827 of file OP_Operator.h.
|
protected |
Definition at line 818 of file OP_Operator.h.
|
protected |
Definition at line 817 of file OP_Operator.h.
|
protected |
Definition at line 821 of file OP_Operator.h.
|
protected |
Definition at line 812 of file OP_Operator.h.
|
protected |
Definition at line 811 of file OP_Operator.h.
|
protected |
Definition at line 823 of file OP_Operator.h.
|
protected |
Definition at line 816 of file OP_Operator.h.
|
protected |
Definition at line 826 of file OP_Operator.h.
|
protected |
Definition at line 819 of file OP_Operator.h.
|
protected |
Definition at line 839 of file OP_Operator.h.
|
protected |
Definition at line 809 of file OP_Operator.h.
|
protected |
Definition at line 815 of file OP_Operator.h.
|
protected |
Definition at line 829 of file OP_Operator.h.
|
protected |
Definition at line 820 of file OP_Operator.h.
|
protected |
Definition at line 822 of file OP_Operator.h.
|
protected |
Definition at line 828 of file OP_Operator.h.