HDK
|
#include <PI_ResourceManager.h>
Classes | |
struct | OpPISettingInfo |
class | PI_OpPIKey |
Public Member Functions | |
PI_ResourceManager () | |
~PI_ResourceManager () override | |
virtual int | registerState (PI_StateTemplate *type) |
virtual int | registerHandle (PI_HandleTemplate *type) |
virtual int | registerOpHandleLink (PI_PITemplate *type) |
virtual int | registerSelector (PI_SelectorTemplate *type) |
bool | containsState (const char *name, PI_ViewerType viewer_type, unsigned netmask) const |
bool | containsHandle (const char *name) const |
bool | containsOpHandleLink (const char *name) const |
bool | containsSelector (const char *name) const |
const PI_BindingHandleArray * | getBindingHandles (OP_Operator *op) const |
const PI_BindingSelectorArray * | getBindingSelectors (OP_Operator *op) const |
const UT_ValArray < PI_StateTemplate * > & | stateList (PI_ViewerType viewer_type, const char *network_type) const |
const UT_ValArray < PI_StateTemplate * > & | stateList (PI_ViewerType viewer_type, PI_NetworkType net_type) const |
PI_StateTemplate * | getStateTemplate (const char *name, PI_ViewerType viewer_type, const char *type) const |
PI_StateTemplate * | getStateTemplate (OP_Operator *op, PI_ViewerType viewer_type, const char *type) const |
void | rebuildVolatileKeys () |
virtual PI_PythonResource::RegisterStatus | getViewerStateRegisterStatus (const char *state_name, PI_ViewerType viewer_type, const char *type) const |
virtual void | fireResourceEvent (PI_PythonResource::ResourceType res_type, PI_PythonResource::EventMessage::Type event_type, PI_PythonResource::EventMessage::Data const &event_data) |
bool | validStateTemplateName (const char *name) const |
virtual PI_PythonResource::Status | unregisterViewerState (const char *name) |
virtual bool | isRegisteredViewerState (const char *name) const |
virtual PI_PythonState::Template const * | viewerStateTemplate (const char *state_name) const |
virtual PI_PythonState::Template * | viewerStateTemplate (const char *state_name) |
virtual PI_PythonResource::Status | unbindVolatileViewerHandles (const char *state_name) |
virtual PI_PythonResource::Status | unregisterViewerHandle (const char *name) |
virtual bool | isRegisteredViewerHandle (const char *name) const |
virtual PI_PythonHandle::Template const * | viewerHandleTemplate (const char *handle_name) const |
virtual UT_StringArray const & | getViewerHandleTypeNames () const |
int | unbind (OP_Operator *op, const char *pidescription, const UT_String &opparm) |
int | bind (OP_Operator *op, const char *piname, const char *pidescription, const UT_String &opparm, const UT_String &piparm, const char *default_settings) |
int | bind (OP_Operator *op, const char *piname, const char *pidescription, const char *default_settings) |
int | bindScriptOp (OP_Operator *op, const char *piname, const char *pidescription, const UT_String &opparm, const UT_String &piparm, const char *default_settings) |
virtual bool | bindOperatorToViewerState (const char *state_name, OP_Operator *op) |
bool | operatorStateMandatory (const char *op_name, const char *op_type) const |
int | unbindSelector (OP_Operator *op, const char *seldescription) |
int | bindSelector (OP_Operator *op, const char *sname, const char *seldescription, const char *prompt, const char *opparm, int opinput, int opinputreq, const char *primmask, int allowdrag, const char *menu, int astselall, const char *extrainfo, bool fromScriptOp) |
PRM_Template * | getTemplateAndVecId (const UT_String &, OP_Operator *, int &) const |
void | getChannelNameFromParmAndVec (UT_String &chan, OP_Operator *op, const char *parmname, int vecidx) |
int | checkForPIName (const char *pi_name, const char *pi_parm) const |
OP_Operator * | findOperator (PI_NetworkType net_type, const char *op_name, bool display_warning=true) const |
OP_Operator * | findOperator (const char *opbindname, UT_String *optype=0) const |
virtual void | findVolatileKeys (const char *volatile_hotkey_name, UT_Array< int > &volatile_keys, UT_Array< int > &keys_modifiers) const |
virtual void | updateViewports (int id, const char *opname, bool open_only=false) const |
const PI_OpHandleLinkMap & | getOpHandleLinks () const |
PI_PITemplate * | getOpHandleLinkTemplate (const char *pi_name) const |
const PI_SelectorTemplateMap & | getSelectors () const |
PI_SelectorTemplate * | getSelectorTemplate (const char *selector_name) const |
const UT_StringArray & | getBuiltinOpHandleNames () |
const PI_HandleTemplateMap & | getHandles () const |
bool | isPIEthereal (const char *piname, bool *isfloat=0) const |
void | ensureStatesExistForAllOperators (const char *net_type_name) |
virtual void | ensureStatesExistForAllOperators (PI_NetworkType net_type) |
int | writeBindingsFile (const char *fname) const |
void | loadPISettingsFromTables (PI_OpHandleLink &pi, bool okay_to_use_last_settings) const |
void | savePISettingsToTables (PI_OpHandleLink &pi) |
virtual void | removePISettingsFromTables (OP_Operator &op_type) |
void | removePISettingsFromTables (const PI_OpHandleLink &pi) |
void | recordPISettings (const char *pi_description, const char *pi_type, const OP_Node &op_node, const char *settings) |
void | addSaveCallback (PI_SaveCallback callback, void *data) |
void | removeSaveCallback (PI_SaveCallback callback, void *data) |
void | registerOpHandleBindings () |
virtual void | removeAllBindings (OP_Operator *op) |
char const * | stateToCreate () const |
void | setPythonResourceSupport (void *res_support) |
void * | getPythonResourceSupport () |
Public Member Functions inherited from OP_UpdateTableSink | |
OP_UpdateTableSink () | |
virtual | ~OP_UpdateTableSink () |
Public Member Functions inherited from OP_UpdateTemplatesSink | |
OP_UpdateTemplatesSink () | |
virtual | ~OP_UpdateTemplatesSink () |
Protected Types | |
using | PI_SaveCallbackInfo = std::pair< PI_SaveCallback, void * > |
Static Protected Member Functions | |
static void | startParmsCache () |
static void | stopParmsCache () |
static void | getParmsCache (UT_ValArray< OP_Node * > *&ops, UT_ValArray< PRM_Parm * > *&parms, UT_IntArray *&vec_indices) |
static void | getParmsCacheBehaviour (bool &set_keys, bool &do_scope, bool &append_scope) |
static OP_ERROR | savePIResourceManagerCallback (std::ostream &os, void *data) |
Protected Attributes | |
UT_StringArray | myBuiltinOpHandleNames |
UT_StringHolder | myStateBeingCreated |
UT_StringSet | myStates |
PI_HandleTemplateMap | myHandles |
PI_OpHandleLinkMap | myOpHandleLinks |
PI_SelectorTemplateMap | mySelectors |
UT_SymbolMap < pi_OpHandleBinding * > | myOpHandleBindings |
UT_SymbolMap < pi_OpSelectorBinding * > | myOpSelectorBindings |
UT_Map< PI_OpPIKey, OpPISettingInfo, PI_OpPIKey::Hasher > | myPISettingsForOps |
UT_StringMap< PI_SettingList * > | myLastPISettings |
UT_ValArray< PI_StateTemplate * > | myStateLists [PI_NUM_VIEWER_TYPES][PI_NUM_NETWORK_TYPES] |
UT_SymbolMap< PI_NetworkType > | myNetworkTypeTable |
UT_Array< PI_SaveCallbackInfo > | mySaveCallbacks |
void * | myCurrentPythonSupport = nullptr |
Static Protected Attributes | |
static bool | ourSetKeyOnParms |
static bool | ourScopeParmChannels |
static bool | ourAppendToScope |
static int | ourCacheParms |
static UT_ValArray< OP_Node * > | ourParmNodes |
static UT_ValArray< PRM_Parm * > | ourParms |
static UT_IntArray | ourParmVecIndices |
static bool | theHideLockedHandleParts |
static bool | theScopeChannelsOnKey |
static bool | theAddScopedChannels |
static bool | theOpenChannelEditorOnScope |
Definition at line 170 of file PI_ResourceManager.h.
|
protected |
Definition at line 603 of file PI_ResourceManager.h.
PI_ResourceManager::PI_ResourceManager | ( | ) |
|
override |
|
protectedvirtual |
void PI_ResourceManager::addSaveCallback | ( | PI_SaveCallback | callback, |
void * | data | ||
) |
int PI_ResourceManager::bind | ( | OP_Operator * | op, |
const char * | piname, | ||
const char * | pidescription, | ||
const UT_String & | opparm, | ||
const UT_String & | piparm, | ||
const char * | default_settings | ||
) |
int PI_ResourceManager::bind | ( | OP_Operator * | op, |
const char * | piname, | ||
const char * | pidescription, | ||
const char * | default_settings | ||
) |
|
virtual |
int PI_ResourceManager::bindScriptOp | ( | OP_Operator * | op, |
const char * | piname, | ||
const char * | pidescription, | ||
const UT_String & | opparm, | ||
const UT_String & | piparm, | ||
const char * | default_settings | ||
) |
int PI_ResourceManager::bindSelector | ( | OP_Operator * | op, |
const char * | sname, | ||
const char * | seldescription, | ||
const char * | prompt, | ||
const char * | opparm, | ||
int | opinput, | ||
int | opinputreq, | ||
const char * | primmask, | ||
int | allowdrag, | ||
const char * | menu, | ||
int | astselall, | ||
const char * | extrainfo, | ||
bool | fromScriptOp | ||
) |
Dynamic binding of a selector to an operator
op | Operator type that we want to bind a selector to |
sname | Selector type |
seldescription | Short description that identifies this selector in the context of a one operator (used to unbind the selector). |
prompt | Text in the status area when the selector is active. |
opparm | Operator parameter where the selection string is put. |
opinput | Wire input index where the op owning the selected geometry is attached to our op. |
opinputreq | Is an input is required? |
primmask | Mask of which primitive types can be in the selection. This uses the *_FILEID enum in GEO_PrimTypeCompat.h. A regular GEO_PrimTypeCompat mask can be used if you first convert it using GEO_PrimTypeCompat::convertToFileFromMask() |
allowdrag | Determines if click-and-drag operations are allowed. |
menu | Operator menu parameter where we choose the selection type. |
astselall | If an asterisk is required in the selection string to indicate selecting all the input. Otherwise we assume an empty string indicates that the whole geometry is selected. |
extrainfo | String that is passed to the selector, particular selectors may need specific parameters that can be passed through this mechanism. |
fromScriptOp | Used by our dialog script parser to avoid infinite recursion. Setting this flag decreases the error checking we do. |
|
static |
int PI_ResourceManager::checkForPIName | ( | const char * | pi_name, |
const char * | pi_parm | ||
) | const |
bool PI_ResourceManager::containsHandle | ( | const char * | name | ) | const |
bool PI_ResourceManager::containsOpHandleLink | ( | const char * | name | ) | const |
bool PI_ResourceManager::containsSelector | ( | const char * | name | ) | const |
bool PI_ResourceManager::containsState | ( | const char * | name, |
PI_ViewerType | viewer_type, | ||
unsigned | netmask | ||
) | const |
void PI_ResourceManager::ensureStatesExistForAllOperators | ( | const char * | net_type_name | ) |
|
virtual |
|
protected |
OP_Operator* PI_ResourceManager::findOperator | ( | PI_NetworkType | net_type, |
const char * | op_name, | ||
bool | display_warning = true |
||
) | const |
OP_Operator* PI_ResourceManager::findOperator | ( | const char * | opbindname, |
UT_String * | optype = 0 |
||
) | const |
|
static |
|
virtual |
Reimplemented in BM_ResourceManager.
|
virtual |
|
inlinestatic |
Definition at line 474 of file PI_ResourceManager.h.
const PI_BindingHandleArray* PI_ResourceManager::getBindingHandles | ( | OP_Operator * | op | ) | const |
const PI_BindingSelectorArray* PI_ResourceManager::getBindingSelectors | ( | OP_Operator * | op | ) | const |
const UT_StringArray& PI_ResourceManager::getBuiltinOpHandleNames | ( | ) |
void PI_ResourceManager::getChannelNameFromParmAndVec | ( | UT_String & | chan, |
OP_Operator * | op, | ||
const char * | parmname, | ||
int | vecidx | ||
) |
|
protected |
|
protected |
|
static |
|
inline |
Definition at line 376 of file PI_ResourceManager.h.
|
protected |
|
inlinestatic |
Definition at line 466 of file PI_ResourceManager.h.
|
static |
|
static |
|
inlinestatic |
Definition at line 478 of file PI_ResourceManager.h.
|
inline |
Definition at line 367 of file PI_ResourceManager.h.
PI_PITemplate* PI_ResourceManager::getOpHandleLinkTemplate | ( | const char * | pi_name | ) | const |
|
static |
|
staticprotected |
|
staticprotected |
void* PI_ResourceManager::getPythonResourceSupport | ( | ) |
|
inlinestatic |
Definition at line 470 of file PI_ResourceManager.h.
|
inline |
Definition at line 369 of file PI_ResourceManager.h.
PI_SelectorTemplate* PI_ResourceManager::getSelectorTemplate | ( | const char * | selector_name | ) | const |
PI_StateTemplate* PI_ResourceManager::getStateTemplate | ( | const char * | name, |
PI_ViewerType | viewer_type, | ||
const char * | type | ||
) | const |
PI_StateTemplate* PI_ResourceManager::getStateTemplate | ( | OP_Operator * | op, |
PI_ViewerType | viewer_type, | ||
const char * | type | ||
) | const |
PRM_Template* PI_ResourceManager::getTemplateAndVecId | ( | const UT_String & | , |
OP_Operator * | , | ||
int & | |||
) | const |
|
virtual |
|
virtual |
|
static |
|
static |
|
protected |
bool PI_ResourceManager::isPIEthereal | ( | const char * | piname, |
bool * | isfloat = 0 |
||
) | const |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
void PI_ResourceManager::loadPISettingsFromTables | ( | PI_OpHandleLink & | pi, |
bool | okay_to_use_last_settings | ||
) | const |
|
protected |
|
protectedvirtual |
|
overrideprotectedvirtual |
Reimplemented from OP_UpdateTemplatesSink.
bool PI_ResourceManager::operatorStateMandatory | ( | const char * | op_name, |
const char * | op_type | ||
) | const |
void PI_ResourceManager::rebuildVolatileKeys | ( | ) |
void PI_ResourceManager::recordPISettings | ( | const char * | pi_description, |
const char * | pi_type, | ||
const OP_Node & | op_node, | ||
const char * | settings | ||
) |
|
protected |
|
virtual |
void PI_ResourceManager::registerOpHandleBindings | ( | ) |
|
protected |
|
virtual |
|
protected |
|
virtual |
|
protected |
|
protected |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in BM_ResourceManager.
void PI_ResourceManager::removePISettingsFromTables | ( | const PI_OpHandleLink & | pi | ) |
void PI_ResourceManager::removeSaveCallback | ( | PI_SaveCallback | callback, |
void * | data | ||
) |
|
protected |
|
staticprotected |
void PI_ResourceManager::savePISettingsToTables | ( | PI_OpHandleLink & | pi | ) |
|
protected |
|
protected |
|
inlinestatic |
Definition at line 476 of file PI_ResourceManager.h.
|
inlinestatic |
Definition at line 468 of file PI_ResourceManager.h.
|
inlinestatic |
Definition at line 480 of file PI_ResourceManager.h.
|
static |
|
inlinestatic |
Definition at line 472 of file PI_ResourceManager.h.
|
staticprotected |
const UT_ValArray<PI_StateTemplate *>& PI_ResourceManager::stateList | ( | PI_ViewerType | viewer_type, |
const char * | network_type | ||
) | const |
const UT_ValArray<PI_StateTemplate *>& PI_ResourceManager::stateList | ( | PI_ViewerType | viewer_type, |
PI_NetworkType | net_type | ||
) | const |
char const* PI_ResourceManager::stateToCreate | ( | ) | const |
|
staticprotected |
|
overrideprotectedvirtual |
Reimplemented from OP_UpdateTableSink.
|
overrideprotectedvirtual |
Implements OP_UpdateTableSink.
|
overrideprotectedvirtual |
Implements OP_UpdateTemplatesSink.
int PI_ResourceManager::unbind | ( | OP_Operator * | op, |
const char * | pidescription, | ||
const UT_String & | opparm | ||
) |
int PI_ResourceManager::unbindSelector | ( | OP_Operator * | op, |
const char * | seldescription | ||
) |
Unbind the given selector from an operator. Uses the short description when bound using bindSelector()
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in BM_ResourceManager.
bool PI_ResourceManager::validStateTemplateName | ( | const char * | name | ) | const |
|
virtual |
|
virtual |
|
virtual |
int PI_ResourceManager::writeBindingsFile | ( | const char * | fname | ) | const |
|
protected |
Definition at line 604 of file PI_ResourceManager.h.
|
protected |
Definition at line 622 of file PI_ResourceManager.h.
|
protected |
Definition at line 607 of file PI_ResourceManager.h.
|
protected |
Definition at line 615 of file PI_ResourceManager.h.
|
protected |
Definition at line 619 of file PI_ResourceManager.h.
|
protected |
Definition at line 611 of file PI_ResourceManager.h.
|
protected |
Definition at line 608 of file PI_ResourceManager.h.
|
protected |
Definition at line 612 of file PI_ResourceManager.h.
|
protected |
Definition at line 614 of file PI_ResourceManager.h.
|
protected |
Definition at line 621 of file PI_ResourceManager.h.
|
protected |
Definition at line 609 of file PI_ResourceManager.h.
|
protected |
Definition at line 605 of file PI_ResourceManager.h.
|
protected |
Definition at line 618 of file PI_ResourceManager.h.
|
protected |
Definition at line 606 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 626 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 627 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 628 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 629 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 630 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 625 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 624 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 634 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 632 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 635 of file PI_ResourceManager.h.
|
staticprotected |
Definition at line 633 of file PI_ResourceManager.h.