All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP3D_GenericSelector Class Reference

#include <OP3D_GenericSelector.h>

+ Inheritance diagram for OP3D_GenericSelector:

Public Member Functions

 OP3D_GenericSelector (OP3D_View &view, PI_SelectorTemplate &templ)
 ~OP3D_GenericSelector () override
const char * className () const override
- Public Member Functions inherited from OP3D_InputSelector
 OP3D_InputSelector (OP3D_View &viewer, PI_SelectorTemplate &templ)
 ~OP3D_InputSelector () override
const char * className () const override
int hasLocates () const override
int handleMouseEvent (UI_Event *event) override
bool handleDoubleClickEvent (UI_Event *event) override
void getKeyResolveInfo (UI_KeyResolveInfo &info) override
int handleKeyEvent (int key, UI_Event *event, DM_Viewport &viewport) override
bool handleTransitoryKey (const UI_Event &event, int hotkey_id) override
bool willHandleKeyEvent (int key, UI_Event *event)
bool inputRequired () const
void setInputRequired (bool onoff)
bool useAsteriskToSelectAll () const
void setUseAsteriskToSelectAll (bool onoff)
void setUsePrimsInEdgeSelections (bool use_prims)
void setAllowEdgeRingSelection (bool allow)
void setOffsetVertexMarkersOverride (bool offset)
GEO_PrimTypeCompat::TypeMask primMask () const override
void setPrimMask (GEO_PrimTypeCompat::TypeMask primmask)
void setSloppyPick (bool on)
bool getSloppyPick () const
bool restrictSloppyAllowedTypesToSubset (const PI_GeometryTypeArray &types)
void setPickAtObjLevel (bool flag)
bool getPickAtObjLevel () const
void startSelecting () override
void stopSelecting () override
void restartWithStashedSelection ()
void commitViewportPreSelection (UI_Event *event, GU_SelectionRule sel_rule) override
void getSelectableLooks (GUI_DetailList &looklist) override
bool addCookedSelection (SOP_Node *sop)
void nodeIdForReselecting (int node_id)
virtual void clearSelections ()
virtual void consumeSelections ()
void removeSelectionsFromDetailLooks ()
void setViewer (BM_View *viewer) override
void setSelectionUIValues (UI_Value *sel_type, UI_Value *sel_rule, UI_Value *sel_style, UI_Value *sel_visible, UI_Value *sel_contained, UI_Value *sel_full, UI_Value *locate_always, UI_Value *finished, UI_Value *located=nullptr)
void setCreatorStateName (const char *state_name)
const UT_StringcreatorStateName ()
void setAllowDragSelect (bool allow_drag)
void setSelectFullGeometry (bool select_full)
void setUseExistingSelection (bool use_existing)
bool useExistingSelection () const
void setUseExistingTempSelection (bool use_existing)
bool useExistingTempSelection () const
void setUseExistingCookSelection (bool use_existing)
bool useExistingCookSelection () const
void setStashSelectionOnFinish (bool stash)
bool getStashSelectionOnFinish () const
void setAllowMultiPickLoopStart (bool allow)
void setInitialSelection (const char *op_path, GA_GroupType type, const char *selection_string)
void setSaveUndos (bool yesno)
bool saveUndos () const
bool connectOps (OP_Node &new_node, int op_input_index, const UT_String &input_parm, int *menu_idx=0, bool branch_off=false, bool multi_input=false, bool force_selection_string=false, bool force_numeric=false, const UT_IntArray *prev_input_nodes=0)
void addSelectedInfo (int info_i, bool set_pick_order=true)
 Some convenience methods for managing mySelectedInfoIndices. More...
void removeSelectedInfo (int info_i)
int updateSelection (const char *path, OP_Node *node, GUI_DetailLook *look, int geo_idx, GU_SelectionHandle selection, const GU_Detail &gdp)
UT_StringArray selectedOpPaths () const
OP3D_SelectionHandles selectedSelections () const
OP3D_SelectionHandles selectedAutoConvertedSelections () const
GU_SelectionHandle selectionFromOpPath (UT_StringRef path, bool only_selected=true) const
GU_SelectionHandle selectionFromInfoKey (const InfoKey &key, bool only_selected=true) const
bool hasNonEmptySelection () const
GU_SelectionHandle getOrCreateSelection (int node_id, int detail_index, int &info_i, GU_SelectionHandle &new_selection, GA_GroupType sel_type)
GU_SelectionHandle getExistingSelection (int node_id, int detail_index, int &info_i, GA_GroupType sel_type)
const UT_StringcurrentPrompt () const
UT_StringcurrentPrompt ()
const UT_StringdefaultPrompt () const
UT_StringdefaultPrompt ()
void selectorFinished (bool drag=false)
void setUndoWorker (OP3D_InputSelectorUndoWorker *worker=0)
OP3D_InputSelectorUndoWorker * getDefaultUndoWorker ()
UI_Menu * getSelectorMenu () const override
UI_Menu * getSelectorHotkeyMenu () const override
void setValidForPickFilter (void *data, OP3D_ValidForPickFilter filter)
void setGeometryType (PI_GeometryType geo_type, bool update_buttons)
GA_GroupType selectionType () const
PI_GeometryType getGeometryTypeAtFinish () const
int getGroupTypeMenuValAtFinish () const
bool getKeepOriginalObjects () const
bool currentlyUpdatingGeometryTypeButtons () const
const PI_GeometryTypeArraygetSelectionAllowedTypes () const
void setSelectionAllowedTypes (const PI_GeometryTypeArray &allowedtypes)
PI_GeometryType getNextBestAllowedType (PI_GeometryType disallowed_type) const
PI_GeometryType mapToAllowedType (PI_GeometryType type, PI_GeometryType failure_type=PI_GEOTYPE_INVALID) const
void generateAllSelectionStrings (UT_String &sel_string, bool only_one_gdp, bool force_numeric, bool consume_selections) override
bool getPostMergeLoopStart (GR_PickRecord &pick)
void bootstrapLoopStart (const char *path, const GR_PickRecord &pick, bool only_selected_path)
void scriptReplaceSelection (PI_GeometryType geo_type, const UT_StringArray &paths, OP3D_SelectionHandles &selections)
bool getStateParmNames (UT_StringArray &ret, const char *prefix=nullptr) override
bool evalStateParm (const char *name, UT_StringHolder &ret) override
bool setStateParm (const char *name, const UT_StringHolder &val) override
bool pressStateButton (const char *name) override
void doRender (RE_Render *r, int x, int y, int ghost) override
void setLocateFilter (LocateFilter filter)
- Public Member Functions inherited from OP3D_InputSelectorBase
 OP3D_InputSelectorBase (OP3D_View &viewer, PI_SelectorTemplate &templ)
 ~OP3D_InputSelectorBase () override
void setViewer (BM_View *viewer) override
void startSelecting () override
void stopSelecting () override
void doRender (RE_Render *r, int x, int y, int ghost) override
UI_ValuefinishedValue ()
const UI_ValuefinishedValue () const
UI_Feel * getCustomToolbox () const override
void setPreferredSelectMode (DM_SelectMode selmode)
DM_SelectMode getPreferredSelectMode () const
bool allowDragging () const
void setAllowDragging (bool on)
bool allowFinishing () const
void setAllowFinishing (bool allow_finishing)
bool allowFinishWithExistingSelection () const
void setAllowFinishWithExistingSelection (bool allow)
bool allowQuickSelect () const
void setAllowQuickSelect (bool on)
bool allowEmptyQuickSelect () const
void setAllowEmptyQuickSelect (bool on)
void setPriorSelections (const UT_StringArray &paths, const UT_StringArray &ids, const OP3D_SelectionHandles &selections)
bool justDisplayedOp () const
void setJustDisplayedOp (bool on)
int handleMouseWheelEvent (UI_Event *event) override
bool handleTransitoryKey (const UI_Event &event, int hotkey_id) override
const char * cursor () const override
void handleSelectionStyleChange (UI_Event *event)
bool getStateParmNames (UT_StringArray &ret, const char *prefix=nullptr) override
bool evalStateParm (const char *name, UT_StringHolder &ret) override
bool setStateParm (const char *name, const UT_StringHolder &val) override
bool pressStateButton (const char *name) override
bool canSelectDrawables () const override
void enableDrawableSelection (bool select_drawables)
void setDrawableMask (UT_StringArray const &drawable_mask)
bool isValid () const
 Returns true if the proxy is still pointing to a valid selector. More...
void intrusive_ptr_release () const
- Public Member Functions inherited from DM_InputSelector
 DM_InputSelector (BM_View &viewer, PI_SelectorTemplate &templ)
 ~DM_InputSelector () override
- Public Member Functions inherited from BM_InputSelector
 BM_InputSelector (BM_View &viewer, PI_SelectorTemplate &templ)
 ~BM_InputSelector () override
virtual void handleNodeDeleted (OP_Node &node)
PI_SelectorTemplategetTemplate ()
const PI_SelectorTemplategetTemplate () const
virtual void overlayRender (RE_Render *r, int x, int y)
void initializeUI ()
- Public Member Functions inherited from AP_Interface
 AP_Interface ()
 AP_Interface (const char *myname, const char *const *names, UI_EventMethod const *methods)
 ~AP_Interface () override
const char * className () const override
const UT_StringgetName () const
 Return the name passed in the constructor. More...
void wireInterface (UI_Manager *uims)
void unwireInterface (UI_Manager *uims)
bool readUIFile (const char *ui_filename, bool quiet=false)
bool readPreferenceFile (const char *pref_filename, bool quiet=false)
void setValueSymbol (const char *symbol, UI_Value *value, bool warn=true)
UI_ValuefindValueSymbol (const char *symbol) const
 Find the UI_Value for the given named value symbol. More...
UI_ValuegetValueSymbol (const char *symbol, int create=1)
int getValueSymbols (UT_StringArray &symbols, UT_Array< UI_Value * > &values) const
void setObjectSymbol (const char *symbol, UI_Object *who, int warn=1)
UI_ObjectgetObjectSymbol (const char *symbol) const
UI_Feel * getFeelSymbol (const char *symbol) const
UI_Feel * findValueFeel (UI_Value *value) const
int getFeelSymbols (UT_StringArray &symbols, UT_Array< UI_Feel * > &feels) const
void setKeyDelegateSymbol (const char *symbol, UI_KeyDelegateSPtr delegate, bool warn=true)
bool hasKeyDelegateSymbol (const char *symbol) const
 Returns whether the current key delegate symbol is defined. More...
UI_KeyDelegateSPtr findKeyDelegateSymbol (const char *symbol) const
 Find the UI_KeyDelegate for the given named key delegate symbol. More...
UI_KeyDelegateSPtr getKeyDelegateSymbol (const char *symbol, int create=1)
void removeObjectSymbol (const char *symbol)
 Delete the entry for the given object symbol name. More...
void removeValueSymbol (const char *symbol)
 Delete the entry for the given value symbol name. More...
template<typename T >
TfindObject (const char *name) const
template<typename T >
TfindValue (const char *name) const
virtual void outputUsage (int argc, const char **argv) const
void resetApplication ()
void handleEvent (UI_Event *event) override
virtual int saveAppData (const char *filename)
virtual int loadAppState ()
virtual int saveAppState ()
virtual void saveOnCoreDump ()
virtual bool getCoreDumpFileName (UT_WorkBuffer &name)
bool loadUIInitPrefs ()
void saveUIInitPrefs (const char *layout_level, fpreal uiscale, int playbarui)
bool restoreUIInitPrefs ()
bool getFunctionKeyScript (int key, UI_Event *event, UT_String &script)
void setKeyBindingProxySrc (const char *symbol, UI_Feel *src, bool warn=true)
void addKeyBindingProxyRef (const char *symbol, UI_Feel *ref, bool warn=true)
- Public Member Functions inherited from UI_Object
 UI_Object ()
virtual ~UI_Object ()
 UI_Object (const UI_Object &)=delete
UI_Objectoperator= (const UI_Object &)=delete
virtual int interestingEvent (UI_EventType t, UI_DeviceEvent *event) const
virtual void deleteReferences (UI_Object *to_whom)
UI_ObjectgetParent () const
void setParent (UI_Object *p)
bool isAncestor (const UI_Object *who) const
void addDependent (UI_Object *who)
bool removeDependent (UI_Object *who)
bool replaceDependent (UI_Object *who, UI_Object *with)
bool isDependent (UI_Object *who) const
bool hasDependents () const
const UI_ObjectListdependents () const
void sendEvent (const UI_Event &e) const
void distributeEvent (UI_Event *event, int upwards)
void relayEvent (UI_Event *event, UI_Object *target)
void generateEvent (UI_EventType t, UI_Object *target)
void purgeEvents (UI_EventType t, UI_Object *target, UI_EventMethod method=0)
void triggerImmediateEvent (UI_Event *event, int upwards)
int getProxyId ()
void bumpQueueCount (int dir)
void setName (const char *symbolName)
const char * getName () const
void buildFullPath (UT_WorkBuffer &string) const
void debugQueueEventsFor (const UI_Value *value, const char *name, UI_EventType t=UI_EVENT_NO_EVENT) const
const UI_ValueListvalueInterests () const
void interestedInValue (UI_Value *)
void removeValueInterest (UI_Value *)
void addKeyDelegateClientship (UI_KeyDelegate *)
void removeKeyDelegateClientship (UI_KeyDelegate *)

Static Public Member Functions

static BM_InputSelectorourConstructor (BM_View &viewer, PI_SelectorTemplate &templ)
- Static Public Member Functions inherited from OP3D_InputSelector
static SOP_NodecreateObjectMerge (OP_Network *network, UT_String &path, GU_SelectionHandle selection, const UT_String &creator_state_name, bool keep_original_objects, bool display_origina_objects)
static void generateMergedSelectionString (UT_String &sel_string, UT_StringArray &paths, OP3D_SelectionHandles &selections, bool ordered, bool collapse, bool use_ast_to_select_all, bool force_numeric)
static bool createSelectionFromObjects (const OP_NodeList &objects, DM_Viewport &viewport, PI_GeometryType geo_type, UT_StringArray &paths, OP3D_SelectionHandles &selections)
- Static Public Member Functions inherited from OP3D_InputSelectorBase
static bool getPickingMenuOn ()
static void setPickingMenuOn (bool val)
static bool getAllowUseExistingSelection ()
static void setAllowUseExistingSelection (bool val)
static bool getSelectFullLoops ()
static void setSelectFullLoops (bool val)
static GU_ConstDetailHandle getGeometryFromPath (const char *path)
static OP_NodegetNodeFromPath (const char *path)
static const SIM_ObjectgetSimObjectFromPath (const char *path)
static const SIM_DatagetSimModifierFromPath (const char *path)
static const char * getFloodFillSelectionHotkeyStringRepr ()
static const char * getLoopSelectionHotkeyStringRepr ()
static bool isTransitoryLoopSelectionHotkey (const UI_DeviceEvent &state, int hotkey_id=0)
static bool isTransitoryLoopSelectionHotkeyPressed (DM_Viewport *viewport)
static void showLoopSelectionMessage (DM_Workbench &workbench)
static void showSelectionHintsMessage (DM_Workbench &workbench)
- Static Public Member Functions inherited from AP_Interface
static FILE * createPreferenceFile (const char *filename)
static int mapStrToInt (const char *label, const std::pair< const char *, int > *map)
static const char * mapIntToStr (int index, const std::pair< const char *, int > *map)
static void setAppExitCode (int exit_code)
static int getAppExitCode ()
static bool isAppExiting ()
 Returns true if the application is exiting. More...
static const char * getStartupDesktop ()
- Static Public Member Functions inherited from UI_Object
static UI_ManagergetManager ()
static UI_Queue * getInputQueue ()
static int keycmp (const char *, int key)
static int keycmp (const char *, int key, const UI_HotkeyEcho &)
static void keyEcho (const char *, const UI_HotkeyEcho &)
static void actionKeyEcho (const char *, const char *custom_suffix=0)
static void toggleKeyEcho (const char *, bool new_value)

Protected Member Functions

void updateGroupMenuValue (PI_GeometryType geo_type, int &group_menu_type) override
PI_GeometryType groupMenuValueToGeometryType (int group_menu_type) const
- Protected Member Functions inherited from OP3D_InputSelector
virtual void handleSelectionTypeChange (UI_Event *event)
virtual void addToSelection (UI_Event *event, const char *path, GU_SelectionHandle sel, GU_SelectResult &added_geo)
virtual bool handleNoPick (UI_Event *event)
virtual void appendToLastNode (SOP_Node *&, const UT_String &, bool)
virtual void generateAdditionalInputNodes (SOP_Node &, SOP_Node *, const UT_String &, const UT_String &)
virtual void setNodeParameters (OP_Node &)
int singlePickMask (GU_SelectionRule sel_rule) const
int areaPickMask (GU_SelectionRule sel_rule) const
int displayPickMask () const
void overrideSelectionValues (int sel_type, int sel_rule, int sel_style, int sel_full, int locate)
void restoreSelectionValues ()
void saveForUndo () override
bool getPickName (const OP3D_PickId &pickid, UT_String &name, bool descriptivename) const override
bool needObjectPick () const override
bool emptySelections (const char *path_to_skip=0, bool refresh=true)
void dirtySelection (SOP_Node *sop_node, DirtySelectionScope *scope)
void dirtySelection (const GUI_DetailLook &geo_look, int geo_idx, DirtySelectionScope *scope)
void dirtySelection (const OP3D_SelectionInfo &sel_info, DirtySelectionScope *scope)
void clearSelectionInfos ()
void clearSelectedInfoIndices ()
int computeNextPickOrder (GA_GroupType sel_type) const
int findInfo (int node_id, int detail_index) const
int findInfo (const char *path) const
- Protected Member Functions inherited from OP3D_InputSelectorBase
OP3D_View & viewer ()
const OP3D_View & viewer () const
DM_Workbench & workbench ()
const DM_Workbench & workbench () const
void setFinishedValuePtr (UI_Value *new_value)
UI_ValuegetFinishedValuePtr () const
void setLocatedValuePtr (UI_Value *new_value)
UI_ValuegetLocatedValuePtr () const
void setSelectionStylePtr (UI_Value *new_value)
UI_ValuegetSelectionStylePtr () const
DM_SelectionStyle selectionStyle () const
void setVisiblePickPtr (UI_Value *new_value)
UI_ValuegetVisiblePickPtr () const
bool getVisiblePick () const
void setContainedPickPtr (UI_Value *new_value)
UI_ValuegetContainedPickPtr () const
bool getContainedPick () const
void setSelectionRulePtr (UI_Value *new_value)
UI_ValuegetSelectionRulePtr () const
GU_SelectionRule selectionRule () const
void selectionRule (GU_SelectionRule srule)
SI_Brush * getPickBrushPtr () const
SI_Brush * getPickLaserPtr () const
SI_Lasso * getPickLassoPtr () const
bool isDragSelectActive () const
bool selectModeMatchesTemplateType ()
bool pickChosenOp (UT_Array< GR_PickRecord > &pick_records, bool *changed=nullptr)
GU_ConstDetailHandle getGeometryFromPickRecord (const GR_PickRecord &pick, GUI_DetailLook **detail_look=nullptr)
virtual OP_NodeswitchToChosenOp (OP_Node *parent, bool *changed=nullptr)
void enablePicker (UI_Event *event)
void disablePicker ()
void disableActivePicking ()
bool isActivePicking () const
bool visibleSelectToggle (UI_Event *event, const char *echo_hotkey)
bool containedSelectToggle (UI_Event *event, const char *echo_hotkey)
const UT_StringArraydrawableMask () const override
void onLocateDrawableSelection () override
unsigned drawablePickMask (unsigned pick_mask) const
bool filterDrawable (const char *drawable_name) const
ProxyHandle getProxy ()
ConstProxyHandle getProxy () const
- Protected Member Functions inherited from BM_InputSelector
BM_View & baseViewer ()
const BM_View & baseViewer () const
void initApplication (UI_Manager *, int, const char **) override
- Protected Member Functions inherited from AP_Interface
UI_NamedValueMapgetValueTable () const
UI_NamedObjectMapgetObjectTable () const
void processKeyBindingProxyRequests ()
- Protected Member Functions inherited from UI_Object
UI_ObjectListdependents ()
virtual void preTerminateCallback ()

Additional Inherited Members

- Public Types inherited from OP3D_InputSelector
using LocateFilter = std::function< bool(DM_Viewport *)>
- Public Types inherited from OP3D_InputSelectorBase
typedef UT_IntrusivePtr< Proxy > ProxyHandle
typedef UT_IntrusivePtr< const
Proxy > 
- Static Public Attributes inherited from AP_Interface
static const std::pair< const
char *, int
theFileChooserStyleMap []
 Menu items and their mapping for file chooser style preference. More...
- Static Protected Member Functions inherited from OP3D_InputSelectorBase
static fpreal getTime ()
- Static Protected Member Functions inherited from AP_Interface
static void setAppForeground ()
static void setTheMainApplication (AP_Interface *app)
static AP_InterfacegetMainApplication ()
static void loadWindowGeometry (UI_Window *window, bool default_maximized, bool use_pref)
static bool getWindowGeometry (int &width, int &height, int &left, int &bottom, bool &maximized, bool use_pref)
static bool getSaveWindowGeoPref ()
static void saveWindowGeoPref ()
static bool loadWindowGeoPref (int &w, int &h, int &left, int &bottom, bool &maximized)
- Protected Attributes inherited from AP_Interface
UT_String myName
const char *constmyValueNames
UI_EventMethod constmyMethods

Detailed Description

Definition at line 32 of file OP3D_GenericSelector.h.

Constructor & Destructor Documentation

OP3D_GenericSelector::OP3D_GenericSelector ( OP3D_View &  view,
PI_SelectorTemplate templ 
OP3D_GenericSelector::~OP3D_GenericSelector ( )

Member Function Documentation

const char* OP3D_GenericSelector::className ( ) const

Reimplemented from DM_InputSelector.

Reimplemented in HDK_Sample::MSS_BrushHairLenSelector.

PI_GeometryType OP3D_GenericSelector::groupMenuValueToGeometryType ( int  group_menu_type) const
static BM_InputSelector* OP3D_GenericSelector::ourConstructor ( BM_View &  viewer,
PI_SelectorTemplate templ 
void OP3D_GenericSelector::updateGroupMenuValue ( PI_GeometryType  geo_type,
int group_menu_type 

Called when selection finishes and we need to stash away the group menu index that gets set for the target operator of this selector.

Implements OP3D_InputSelector.

The documentation for this class was generated from the following file: