14 #ifndef __OP3D_InputSelector_h__ 
   15 #define __OP3D_InputSelector_h__ 
   33 class DM_HeldHotkeyCache;
 
   34 class OP3D_InputSelectorUndoWorker;
 
   35 class OP3D_EdgeLoopHelper;
 
   36 class OP3D_PatternSelectHelper;
 
  119                                         DM_Viewport &viewport) 
override;
 
  121                                              int hotkey_id) 
override;
 
  129                             { myInputRequiredFlag = onoff; }
 
  135                             { 
return myUseAsteriskToSelectAll; }
 
  137                             { myUseAsteriskToSelectAll = onoff;}
 
  143                                   { myUsePrimsInEdgeSelectionFlag = use_prims; }
 
  148                             { myAllowEdgeRingSelection = allow; }
 
  153                             { myOffsetVertexMarkersOverride = 
offset; }
 
  160                             { 
return myPrimMask; }
 
  162                             { myPrimMask = primmask; }
 
  178     void                 setSloppyPick(
bool on);
 
  180                             { 
return mySloppyPick; }
 
  188     bool                 restrictSloppyAllowedTypesToSubset(
 
  193                             { myPickAtObjLevelFlag = flag; }
 
  195                             { 
return myPickAtObjLevelFlag; }
 
  201     void                 restartWithStashedSelection();
 
  212     bool                 addCookedSelection(
SOP_Node *sop);
 
  217                             { myNodeIdForReselecting = node_id; }
 
  221     virtual void         clearSelections();
 
  226     virtual void         consumeSelections();
 
  229     void                 removeSelectionsFromDetailLooks();
 
  236     void                 stashPendingSelection();
 
  244     void                 setViewer(BM_View *viewer) 
override;
 
  248     void                 setSelectionUIValues(
UI_Value *sel_type,
 
  261                          { myCreatorStateName.harden(state_name); }
 
  263                          { 
return myCreatorStateName; }
 
  267                          { myAllowDragSelFlag = allow_drag; }
 
  271                          { myFullSelFlag = select_full; }
 
  279                              setUseExistingTempSelection(use_existing);
 
  280                              setUseExistingCookSelection(use_existing);
 
  284                              return useExistingTempSelection() ||
 
  285                                     useExistingCookSelection();
 
  291                          { myUseExistingTempSelection = use_existing; }
 
  293                          { 
return myUseExistingTempSelection; }
 
  299                          { myUseExistingCookSelection = use_existing; }
 
  301                          { 
return myUseExistingCookSelection; }
 
  305                          { myStashSelectionOnFinish = stash; }
 
  307                          { 
return myStashSelectionOnFinish; }
 
  310                          { myAllowMultiPickLoopStart = allow; }
 
  319     void                 setInitialSelection(
const char *op_path,
 
  321                                              const char *selection_string);
 
  338     bool                 connectOps(
OP_Node &new_node, 
int op_input_index,
 
  341                                 bool branch_off = 
false,
 
  342                                 bool multi_input = 
false,
 
  343                                 bool force_selection_string = 
false,
 
  344                                 bool force_numeric = 
false,
 
  348     void                 addSelectedInfo(
int info_i, 
bool set_pick_order=
true);
 
  349     void                 removeSelectedInfo(
int info_i);
 
  353     int                  updateSelection(
const char *
path, 
OP_Node *node,
 
  386                                            bool only_selected=
true) 
const;
 
  392                                             bool only_selected=
true) 
const;
 
  395     bool                 hasNonEmptySelection() 
const;
 
  422     void                 selectorFinished(
bool drag = 
false);
 
  432                                 bool keep_original_objects,
 
  433                                 bool display_origina_objects);
 
  437     void                 setUndoWorker(OP3D_InputSelectorUndoWorker *worker=0);
 
  439     OP3D_InputSelectorUndoWorker *getDefaultUndoWorker();
 
  445     void                 setValidForPickFilter(
void *
data,
 
  452                                 bool update_buttons);
 
  457     int                  getGroupTypeMenuValAtFinish() 
const;
 
  458     bool                 getKeepOriginalObjects() 
const;
 
  464     bool                 currentlyUpdatingGeometryTypeButtons() 
const;
 
  467     void                 setSelectionAllowedTypes(
 
  492                                 bool consume_selections) 
override;
 
  493     static void          generateMergedSelectionString(
UT_String &sel_string,
 
  498                                 bool use_ast_to_select_all,
 
  513     void                 bootstrapLoopStart(
const char *
path,
 
  515                                 bool only_selected_path);
 
  519     void                 scriptReplaceSelection(
 
  526     static bool          createSelectionFromObjects(
 
  528                                 DM_Viewport &viewport,
 
  535                                 const char* prefix = 
nullptr) 
override;
 
  553             : myNodeId(node_id), myDetailIndex(detail_index)
 
  558             return myNodeId == key.myNodeId &&
 
  559                     myDetailIndex == key.myDetailIndex;
 
  571                             { myLocateFilter = 
filter; }
 
  583                                 int &group_menu_type) = 0;
 
  623     int                  displayPickMask() 
const;
 
  633     void                 overrideSelectionValues(
int sel_type, 
int sel_rule,
 
  634                                                  int sel_style, 
int sel_full,
 
  637     void                 restoreSelectionValues();
 
  640     void                 saveForUndo() 
override;
 
  646                                      bool descriptivename) 
const override;
 
  650     bool                 needObjectPick() 
const override;
 
  654     bool                 emptySelections(
const char *path_to_skip = 0,
 
  655                                          bool refresh = 
true);
 
  676     void                 clearSelectionInfos();
 
  679     void                 clearSelectedInfoIndices();
 
  685     int                  findInfo(
int node_id, 
int detail_index) 
const;
 
  686     int                  findInfo(
const char *
path) 
const;
 
  693     friend class         OP3D_InputSelectorUndo;
 
  696                                              bool objects_only) 
const;
 
  704                                 int xcenter, 
int ycenter,
 
  705                                 int xsize, 
int ysize);
 
  713                                              bool contained_only);
 
  724     void                 fullSelectionChanged(
UI_Event *);
 
  729                                                  DM_Viewport &viewport);
 
  733     void                 revertToCookSelection(DM_Viewport &viewport);
 
  738     void                 selectBoundary(DM_Viewport &viewport);
 
  739     void                 selectEdgeBoundary(DM_Viewport &viewport);
 
  740     void                 shrinkSelection(DM_Viewport &viewport);
 
  741     void                 growSelection(DM_Viewport &viewport);
 
  742     void                 selectPrimitivesWithVertexCount(
 
  743                             DM_Viewport &viewport,
 
  744                             const char *command_name,
 
  747     using PatternExpandFunc = 
bool (OP3D_PatternSelectHelper::*)
 
  751     void                 patternSet(DM_Viewport &viewport);
 
  752     void                 patternExpand(DM_Viewport &viewport,
 
  753                                        PatternExpandFunc 
func,
 
  758     void                 uvSelectAllByWinding(DM_Viewport &viewport,
 
  762     void                 convertSelection(DM_Viewport &viewport,
 
  768                                         bool &added_something);
 
  798     bool                 isAnythingSelected();
 
  805                                                        bool *inserted_above);
 
  809     void                 setVisibilitySopParameters(
SOP_Node &visibility_sop,
 
  811                                 bool applying_to_selection,
 
  815     OP3D_EdgeLoopHelper &getEdgeLoopHelper();
 
  817     OP3D_PatternSelectHelper &getPatternSelectHelper(
int sop_node_id,
 
  822     SOP_Node *           findChosenSop(
bool &need_object_pick);
 
  825     void                 doneNormalSelection();
 
  827     bool                 areaSelectGeometry(
UI_Event *e,
 
  834                                             bool add_to_existing_picks);
 
  840     bool                 adoptLocatedItems(DM_Viewport *viewport,
 
  843                                            bool force_locate = 
false);
 
  850     bool                 initWithPendingSelectionForVisibleOps(
 
  852                                             bool &have_chosen_sop_temp_sel);
 
  854     void                 autoConvertToFinishGeometryType();
 
  856     void                 addInitialSelections();
 
  860     void                 updateSelectMask();
 
  863     void                 resetSloppyPickMask();
 
  866     void                 updateExistingSloppySelectionType(
 
  871     void                 initSloppySelectionType(
 
  877     void                 setSloppySelectionType(
 
  923     bool                 selectionConvertBreakpointKey(
int key,
 
  931     void                 handleMouseActionComplete();
 
  936     void                 expandPickByNormal(
 
  941                             bool pick_all_matching_normals,
 
  942                             bool use_static_reference_normal,
 
  948     void                 expandPickByFloodFill(
 
  959     void                 updateLoopStartPickRecordFromPath(
 
  960                                                     bool record_match_state);
 
  970     bool                 areVerticesOfSamePoint(
 
  973     void                 extendVertexPickRecords(
 
  990     DM_Viewport         *myHotkeyViewport;
 
 1008     unsigned             mySloppyPickMask;
 
 1012     bool                 mySloppySelectionTypeIsSet;
 
 1016     bool                 myCustomSelValFlag;
 
 1019     int                  mySavedSelStyle;
 
 1021     int                  mySavedAlwaysLocate;
 
 1031     int                          myNextPickOrder;
 
 1036     int                  myLastMouseDown;       
 
 1037     int                  myLastMouseStartX;     
 
 1038     int                  myLastMouseStartY;     
 
 1040     bool                 myResizingCursor;      
 
 1042     int                  myNodeIdForReselecting;
 
 1044     bool                 myUseExistingTempSelection;
 
 1045     bool                 myUseExistingCookSelection;
 
 1046     bool                 myStashSelectionOnFinish;
 
 1047     bool                 myInputRequiredFlag;   
 
 1048     bool                 myAllowDragSelFlag;    
 
 1050     bool                 mySaveUndosFlag;       
 
 1051     bool                 myUseAsteriskToSelectAll; 
 
 1052     bool                 myUsePrimsInEdgeSelectionFlag; 
 
 1054     bool                 myPickAtObjLevelFlag;  
 
 1055     bool                 myAllowEdgeRingSelection;
 
 1056     int                  myOffsetVertexMarkersOverride;
 
 1057     int                  myOffsetVertexMarkersSaved;
 
 1061     bool                 myAutoConvertedSelectionsFlag;
 
 1065     int                  myFinishGroupTypeMenuVal;
 
 1072     bool                 myUpdatingGeometryTypeButtons;
 
 1074     bool                 myHadDoubleClick;
 
 1076     struct InitialSelection
 
 1084     OP3D_InputSelectorUndoWorker        *myUndoWorker;
 
 1085     bool                                 myOwnUndoWorker;
 
 1088     HeldHotkeyCacheUPtr                  myHeldHotkeyCache;
 
 1097     OP3D_EdgeLoopHelper                 *myEdgeLoopHelper;
 
 1101     bool                                 myLoopStartPickOnlyLocated;
 
 1102     bool                                 myLoopStartPickRecordMatchesPath;
 
 1104     void                                *myValidForPickFilterData;
 
 1106     LocateFilter         myLocateFilter                         = 
nullptr;
 
 1107     bool                 myAllowMultiPickLoopStart              = 
false;
 
GT_API const UT_StringHolder selection
 
Definition of a geometry attribute. 
 
GUI_GUSelectionProxyHandle myProxy
 
GU_SelectionHandle selection() const 
 
UT_SharedPtr< GUI_GUSelectionProxy > GUI_GUSelectionProxyHandle
 
GLsizei const GLchar *const * path
 
exint GA_Size
Defines the bit width for index and offset types in GA. 
 
void updateProxy(GU_SelectionHandle sel, bool create)
 
GA_GroupType myActiveType
 
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects. 
 
GLint GLint GLsizei GLint GLenum GLenum type
 
GA_API const UT_StringHolder drag
 
GLuint const GLchar * name
 
UT_SharedPtr< GU_Selection > GU_SelectionHandle
 
Contains transitional objects to provide some backward compatibility for code that references old GEO...
 
GUI_DetailLook * getLook() const 
 
GA_GroupType
An ordinal enum for the different types of groups in GA. 
 
GA_GroupType selectionType() const 
 
OP3D_SelectionManager::ComponentScopeKey ScopeKey
 
UT_SharedPtr< OP3D_GUSelectionSet > OP3D_GUSelectionSetHandle
 
bool myIsSelectionSetOwner
 
GLsizei GLenum GLenum * types
 
GU_SelectionHandle myAutoConvertedSelection
 
OP3D_GUSelectionSetHandle mySelectionSet
 
GA_API const UT_StringHolder area
 
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter