HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_SceneViewer.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_SceneViewer_h__
10 #define __HOM_SceneViewer_h__
11 
12 #include "HOM_PathBasedPaneTab.h"
13 #include "HOM_EnumModules.h"
14 #include "HOM_BoundingBox.h"
15 #include "HOM_Vector3.h"
16 #include "HOM_Vector2.h"
17 #include "HOM_Matrix3.h"
18 #include <UT/UT_Tuple.h>
19 #include <vector>
20 
22 class HOM_ReferencePlane;
23 class HOM_DopData;
27 class HOM_Selection;
28 class HOM_SopNode;
31 
32 SWIGOUT(%rename(SceneViewer) HOM_SceneViewer;)
33 
35 {
36 public:
37  typedef std::vector< std::pair<std::string, std::string> > Bindings;
38  typedef std::vector< std::string > HandleParmNames;
39 
41  { HOM_CONSTRUCT_OBJECT(this) }
42 
43  // Because the lowermost base classes initialize the virtual bases
44  // before any non-virtual bases, the correct thing to do here is
45  // explicitly call the constructor for HOM_PaneTab.
47  : HOM_PaneTab(pane), HOM_PathBasedPaneTab(pane)
48  { HOM_CONSTRUCT_OBJECT(this) }
49 
50  ~HOM_SceneViewer() override
51  { HOM_DESTRUCT_OBJECT(this) }
52 
53  // Let swig know we're overriding __repr__ for this class so it doesn't
54  // provide its own __repr__.
55  SWIGOUT(virtual std::string __repr__() = 0;)
56 
57  // returns a stateViewerType enum, either Scene or SceneGraph.
58  virtual HOM_EnumValue &viewerType() = 0;
59 
60  virtual std::vector<HOM_ElemPtr<HOM_GeometryViewport> > viewports() = 0;
61  SWIGOUT(%newobject findViewport;)
62  virtual HOM_GeometryViewport *findViewport(const char *name) = 0;
63  SWIGOUT(%newobject curViewport;)
64  virtual HOM_GeometryViewport *curViewport() = 0;
65  virtual HOM_GeometryViewport * selectedViewport() = 0;
66 
67  virtual std::string currentState() = 0;
68  virtual void enterViewState(bool wait_for_exit = false) = 0;
69  virtual void enterCurrentNodeState(bool wait_for_exit = false) = 0;
70  virtual void enterTranslateToolState(bool wait_for_exit = false) = 0;
71  virtual void enterRotateToolState(bool wait_for_exit = false) = 0;
72  virtual void enterScaleToolState(bool wait_for_exit = false) = 0;
73  SWIGOUT(%kwargs setCurrentState;)
74  virtual void setCurrentState(const char *state, bool wait_for_exit = false,
75  const HOM_EnumValue &generate =
76  HOM_stateGenerateMode::Insert,
77  bool request_new_on_generate = false,
78  bool ex_situ_generate = false) = 0;
79  virtual void _waitForStateExit(const char *state=NULL) = 0;
80  virtual std::string _currentBaseState() = 0;
81 
82  virtual std::vector<std::string> _getCurrentStateParmNames() = 0;
83  virtual std::string _evalCurrentStateParm(const char *name) = 0;
84  virtual bool _setCurrentStateParm(const char *name, const char* value) =0;
85  virtual bool _pressCurrentStateButton(const char *name)=0;
86 
87  virtual bool isCreateInContext() = 0;
88  virtual bool isWorldSpaceLocal() = 0;
89 
90  virtual HOM_EnumValue& viewportLayout() = 0;
91  virtual void setViewportLayout(HOM_EnumValue &layout, int single = -1) = 0;
92 
93  SWIGOUT(%kwargs selectObjects;)
94  virtual std::vector<HOM_ElemPtr<HOM_Node> >
95  selectObjects(
96  const char *prompt = "Select objects",
97  int sel_index = 0,
98  bool allow_drag = false,
99  bool quick_select = false,
100  bool use_existing_selection = true,
101  bool allow_multisel = true,
102  const std::vector<std::string> &allowed_types =
103  std::vector<std::string>(1, "*"),
104  const char *icon = NULL,
105  const char *label = NULL,
106  const std::vector<std::string> &prior_selection_paths =
107  std::vector<std::string>(),
108  const std::vector<std::string> &prior_selection_ids =
109  std::vector<std::string>(),
110  const std::vector<HOM_Selection *> &prior_selections =
111  std::vector<HOM_Selection *>(),
112  HOM_ParmTemplateGroup *toolbox_templategroup = nullptr,
113  HOM_ParmTemplateGroup *toolbox1_templategroup = nullptr,
114  bool confirm_existing = false,
115  const char *select_parm = nullptr
116  ) = 0;
117 
118  SWIGOUT(%newobject selectGeometry;)
119  SWIGOUT(%kwargs selectGeometry;)
120  virtual HOM_GeometrySelection *
121  selectGeometry(
122  const char *prompt = "Select geometry",
123  int sel_index = 0,
124  bool allow_drag = false,
125  bool quick_select = false,
126  bool use_existing_selection = true,
127  const char *initial_selection = NULL,
128  HOM_EnumValue *initial_selection_type = NULL,
129  bool ordered = false,
130  const std::vector<HOM_EnumValue *> geometry_types =
131  std::vector<HOM_EnumValue *>(),
132  const std::vector<HOM_EnumValue *> primitive_types =
133  std::vector<HOM_EnumValue *>(),
134  bool allow_obj_sel = true,
135  const char *icon = NULL,
136  const char *label = NULL,
137  const std::vector<std::string> &prior_selection_paths =
138  std::vector<std::string>(),
139  const std::vector<std::string> &prior_selection_ids =
140  std::vector<std::string>(),
141  const std::vector<HOM_Selection *> &prior_selections =
142  std::vector<HOM_Selection *>(),
143  bool allow_other_sops = true,
144  bool consume_selections = true,
145  HOM_ParmTemplateGroup *toolbox_templategroup = nullptr,
146  HOM_ParmTemplateGroup *toolbox1_templategroup = nullptr,
147  bool confirm_existing = false,
148  bool pick_at_obj_level = false,
149  const char *select_parm = nullptr
150  ) = 0;
151 
152  SWIGOUT(%kwargs selectDynamics;)
153  virtual std::vector<HOM_ElemPtr<HOM_DopData> >
154  selectDynamics(
155  const char *prompt = "Select dynamics objects",
156  int sel_index = 0,
157  bool allow_objects = true,
158  bool allow_modifiers = false,
159  bool quick_select = false,
160  bool use_existing_selection = true,
161  bool allow_multisel = true,
162  const char *icon = NULL,
163  const char *label = NULL,
164  const std::vector<std::string> &prior_selection_paths =
165  std::vector<std::string>(),
166  const std::vector<std::string> &prior_selection_ids =
167  std::vector<std::string>(),
168  const std::vector<HOM_Selection *> &prior_selections =
169  std::vector<HOM_Selection *>(),
170  HOM_ParmTemplateGroup *toolbox_templategroup = nullptr,
171  HOM_ParmTemplateGroup *toolbox1_templategroup = nullptr,
172  const char *select_parm = nullptr
173  ) = 0;
174 
175  SWIGOUT(%kwargs selectDynamicsPoints;)
176  virtual std::vector<std::pair<HOM_ElemPtr<HOM_DopData>,
178  selectDynamicsPoints(
179  const char *prompt = "Select dynamics points",
180  int sel_index = 0,
181  bool quick_select = false,
182  bool use_existing_selection = true,
183  bool allow_multisel = true,
184  bool only_select_points = true,
185  bool object_based_point_selection = false,
186  bool use_last_selected_object = false,
187  const char *icon = NULL,
188  const char *label = NULL,
189  const std::vector<std::string> &prior_selection_paths =
190  std::vector<std::string>(),
191  const std::vector<std::string> &prior_selection_ids =
192  std::vector<std::string>(),
193  const std::vector<HOM_Selection *> &prior_selections =
194  std::vector<HOM_Selection *>(),
195  HOM_ParmTemplateGroup *toolbox_templategroup = nullptr,
196  HOM_ParmTemplateGroup *toolbox1_templategroup = nullptr,
197  const char *select_parm = nullptr
198  )= 0;
199 
200  SWIGOUT(%kwargs selectDynamicsPolygons;)
201  virtual std::vector<std::pair<HOM_ElemPtr<HOM_DopData>,
203  selectDynamicsPolygons(
204  const char *prompt = "Select dynamics polygons",
205  int sel_index = 0,
206  bool quick_select = false,
207  bool use_existing_selection = true,
208  bool object_based_point_selection = false,
209  bool use_last_selected_object = false,
210  const char *icon = NULL,
211  const char *label = NULL,
212  const std::vector<std::string> &prior_selection_paths =
213  std::vector<std::string>(),
214  const std::vector<std::string> &prior_selection_ids =
215  std::vector<std::string>(),
216  const std::vector<HOM_Selection *> &prior_selections =
217  std::vector<HOM_Selection *>(),
218  HOM_ParmTemplateGroup *toolbox_templategroup = nullptr,
219  HOM_ParmTemplateGroup *toolbox1_templategroup = nullptr,
220  const char *select_parm = nullptr
221  ) = 0;
222 
223  SWIGOUT(%kwargs selectSceneGraph;)
224  virtual std::vector<std::string>
225  selectSceneGraph(
226  const char *prompt = "Select primitives",
227  const std::vector<std::string> &preselection =
228  std::vector<std::string>(),
229  const HOM_EnumValue &prim_mask= HOM_scenePrimMask::ViewerSetting,
230  bool quick_select = false,
231  bool use_existing_selection = true,
232  bool confirm_existing = false,
233  bool allow_multisel = true,
234  bool allow_drag = true,
235  bool allow_selection_type_changes = false,
236  bool propagate_selection = true,
237  const char *path_prefix_mask = nullptr,
238  const char *prim_kind = nullptr,
239  HOM_Node *validate_selection_for_node = nullptr,
240  const char *select_parm = nullptr,
241  const HOM_EnumValue &allow_kind_mismatch =
242  HOM_optionalBool::NoOpinion,
243  const HOM_EnumValue &allow_instance_proxies =
244  HOM_optionalBool::NoOpinion,
245  bool fix_preselection_paths = true
246  ) = 0;
247 
248  SWIGOUT(%kwargs selectSceneGraphInstances;)
249  virtual std::vector<std::string>
250  selectSceneGraphInstances(
251  const char *prompt = "Select point instances",
252  const std::vector<std::string> &preselection =
253  std::vector<std::string>(),
254  bool quick_select = false,
255  bool use_existing_selection = true,
256  bool confirm_existing = false,
257  bool allow_multisel = true,
258  bool allow_drag = true,
259  bool allow_selection_type_changes = false,
260  const char *path_prefix_mask = nullptr,
261  int instance_level = 0,
262  bool instance_indices_only = false,
263  HOM_Node *validate_selection_for_node = nullptr,
264  const char *select_parm = nullptr
265  ) = 0;
266 
267 
268  SWIGOUT(%newobject selectPositions;)
269  SWIGOUT(%kwargs selectPositions;)
270  virtual std::vector<HOM_ElemPtr<HOM_Vector3> >
271  selectPositions(
272  const char *prompt = "Click to specify a position",
273  int number_of_positions = 1,
274  int min_number_of_positions = -1,
275  bool connect_positions = true,
276  bool show_coordinates = true,
277  const HOM_BoundingBox &bbox = HOM_BoundingBox(),
278  HOM_EnumValue &position_type = HOM_positionType::WorldSpace,
279  const char *icon = NULL,
280  const char *label = NULL,
281  HOM_ParmTemplateGroup *toolbox_templategroup = nullptr,
282  HOM_ParmTemplateGroup *toolbox1_templategroup = nullptr,
283  const char *select_parm = nullptr
284  ) = 0;
285 
286  SWIGOUT(%kwargs selectOrientedPositions;)
287  virtual std::vector<std::pair<HOM_ElemPtr<HOM_Vector3>,
289  selectOrientedPositions(
290  const char *prompt = "Click to specify a position",
291  int number_of_positions = 1,
292  int min_number_of_positions = -1,
293  bool connect_positions = true,
294  bool show_coordinates = true,
295  const HOM_Matrix3 &base_orientation = HOM_Matrix3(1.0),
296  const HOM_BoundingBox &bbox = HOM_BoundingBox(),
297  const char *icon = NULL,
298  const char *label = NULL,
299  HOM_ParmTemplateGroup *toolbox_templategroup = nullptr,
300  HOM_ParmTemplateGroup *toolbox1_templategroup = nullptr,
301  const char *select_parm = nullptr
302  ) = 0;
303 
304  SWIGOUT(%ignore _selectDrawableGeometry;)
305  SWIGOUT(%kwargs _selectDrawableGeometry;)
306  virtual void _selectDrawableGeometry(void* drawable_selection, HOM_EnumValue & selection_modifier) = 0;
307 #ifdef SWIG
308 %extend
309 {
310  SWIGOUT(%kwargs selectDrawableGeometry;)
311  virtual void selectDrawableGeometry(InterpreterObject drawable_selection,
312  HOM_EnumValue & selection_modifier=HOM_pickModifier::Replace)
313  {
314  self->_selectDrawableGeometry(drawable_selection, selection_modifier);
315  }
316 }
317 #endif
318 
319 
320  SWIGOUT(%newobject currentGeometrySelection;)
321  virtual HOM_GeometrySelection *currentGeometrySelection() = 0;
322  virtual std::string currentGeometrySelectionParm() =0;
323 
324  virtual void setCurrentGeometrySelection(
325  HOM_EnumValue &geometry_type,
326  const std::vector<HOM_Node *> &nodes,
327  const std::vector<HOM_Selection *> &selections) = 0;
328 
329  virtual std::vector<std::string> currentSceneGraphSelection() = 0;
330  virtual void setCurrentSceneGraphSelection(
331  const std::vector<std::string> &selection,
332  bool fix_selection_paths = true) = 0;
333 
334  virtual std::vector<std::string> sceneGraphHighlight() = 0;
335  virtual void setSceneGraphHighlight(const std::vector<std::string> &highlight) = 0;
336 
337  virtual UT_Tuple<double, std::string> locateSceneGraphPrim(
338  int x, int y,
339  const HOM_EnumValue &prim_mask =
340  HOM_scenePrimMask::ViewerSetting) = 0;
341 
342  virtual bool sceneGraphStageLocked() = 0;
343  virtual void setSceneGraphStageLocked(bool locked) = 0;
344 
345  // Snapping control
346  virtual HOM_EnumValue &snappingMode() = 0;
347  virtual void setSnappingMode(HOM_EnumValue &snapping_mode) = 0;
348 
349  virtual bool isSnappingToCurrentGeometry() = 0;
350  virtual void setSnapToCurrentGeometry(bool on) = 0;
351 
352  virtual bool isSnappingToTemplates() = 0;
353  virtual void setSnapToTemplates(bool on) = 0;
354 
355  virtual bool isSnappingToOtherObjects() = 0;
356  virtual void setSnapToOtherObjects(bool on) = 0;
357 
358  virtual bool isSnappingToGuides() = 0;
359  virtual void setSnapToGuides(bool on) = 0;
360 
361  virtual bool isDepthSnapping() = 0;
362  virtual void setDepthSnapping(bool on) = 0;
363 
364  virtual bool isOrientingOnSnap() = 0;
365  virtual void setOrientOnSnap(bool on) = 0;
366 
367  virtual float snappingGravity() = 0;
368  virtual std::vector<HOM_EnumValue*> snappingPriorities() = 0;
369 
370  // Selection control
371  virtual bool isPickingVisibleGeometry() = 0;
372  virtual void setPickingVisibleGeometry(bool on) = 0;
373 
374  virtual bool isPickingContainedGeometry() = 0;
375  virtual void setPickingContainedGeometry(bool on) = 0;
376 
377  virtual bool isGroupPicking() = 0;
378  virtual void setGroupPicking(bool on) = 0;
379 
380  virtual bool isWholeGeometryPicking() = 0;
381  virtual void setWholeGeometryPicking(bool on) = 0;
382 
383  virtual bool isSecureSelection() = 0;
384  virtual void setSecureSelection(bool on) = 0;
385 
386  virtual bool isPickingCurrentNode() = 0;
387  virtual void setPickingCurrentNode(bool on) = 0;
388 
389  virtual HOM_EnumValue &pickGeometryType() = 0;
390  virtual void setPickGeometryType(HOM_EnumValue &geometry_type) = 0;
391 
392  virtual HOM_EnumValue &selectionMode() = 0;
393  virtual void setSelectionMode(HOM_EnumValue &style) = 0;
394 
395  virtual HOM_EnumValue &pickStyle() = 0;
396  virtual void setPickStyle(HOM_EnumValue &style) = 0;
397 
398  virtual HOM_EnumValue &pickModifier() = 0;
399  virtual void setPickModifier(HOM_EnumValue &modifier) = 0;
400 
401  virtual HOM_EnumValue &defaultPickModifier() = 0;
402  virtual void setDefaultPickModifier(HOM_EnumValue &modifier) = 0;
403 
404  virtual HOM_EnumValue &pickFacing() = 0;
405  virtual void setPickFacing(HOM_EnumValue &facing) = 0;
406 
407  virtual HOM_EnumValue & activePickModifier() = 0;
408 
409  // Group list control
410  virtual bool isGroupListVisible() = 0;
411  virtual void setGroupListVisible(bool on) = 0;
412 
413  virtual bool isGroupListColoringGeometry() = 0;
414  virtual void setGroupListColoringGeometry(bool on) = 0;
415 
416  virtual bool isGroupListShowingEmptyGroups() = 0;
417  virtual void setGroupListShowingEmptyGroups(bool on) = 0;
418 
419  virtual bool isGroupListShowingOnlyPreSelectedGroups() = 0;
420  virtual void setGroupListShowingOnlyPreSelectedGroups(bool on) = 0;
421 
422  virtual bool isGroupListCondensingPathHierarchies() = 0;
423  virtual void setGroupListCondensingPathHierarchies(bool on) = 0;
424 
425  virtual HOM_Vector2 *groupListSize() = 0;
426  virtual void setGroupListSize(double width, double height) = 0;
427 
428  virtual HOM_EnumValue &groupListType() = 0;
429  virtual void setGroupListType(HOM_EnumValue &group_list_type) = 0;
430 
431  virtual std::string groupListMask() = 0;
432  virtual void setGroupListMask(const char *mask) = 0;
433 
434  // Construction plane access
435  SWIGOUT(%newobject constructionPlane;)
436  virtual HOM_ConstructionPlane *constructionPlane() = 0;
437 
438  // Reference plane access
439  SWIGOUT(%newobject referencePlane;)
440  virtual HOM_ReferencePlane *referencePlane() = 0;
441 
442  SWIGOUT(%newobject flipbookSettings;)
443  virtual HOM_FlipbookSettings *flipbookSettings() = 0;
444 
445  SWIGOUT(%kwargs flipbook;)
446  virtual void flipbook(HOM_GeometryViewport *viewport = NULL,
447  HOM_FlipbookSettings *settings = NULL,
448  bool open_dialog = false) = 0;
449 
450  virtual void runShelfTool(const char *tool_name) = 0;
451 
452  virtual void beginStateUndo(const char *label) = 0;
453  virtual void endStateUndo() = 0;
454 
455  virtual void setPromptMessage(
456  std::string const & msg,
457  HOM_EnumValue const & msg_type = HOM_promptMessageType::Prompt) = 0;
458  virtual void clearPromptMessage() = 0;
459 
460  SWIGOUT(%kwargs flashmessage;)
461  virtual void flashMessage(
462  std::string const &image,
463  std::string const &msg,
464  float duration = 1.0,
465  HOM_GeometryViewport *viewport = NULL) = 0;
466 
467  virtual std::vector<std::vector<std::string> >
468  hotkeyAssignments(const std::vector<std::string> &hotkey_symbols) = 0;
469 
470  virtual void showHandle( std::string const& name, bool value ) = 0;
471 
472  virtual void openVisualizerEditor(HOM_ViewportVisualizer *vis) = 0;
473 
474  virtual void openOptionDialog(const char *path, const char *label) = 0;
475 
476  SWIGOUT(%kwargs triggerStateSelector;)
477  virtual void triggerStateSelector(
478  HOM_EnumValue const &action,
479  std::string const &name=std::string()) = 0;
480  virtual std::string currentStateSelector() = 0;
481 
482  SWIGOUT(%ignore _runStateCommand;)
483  SWIGOUT(%kwargs _runStateCommand;)
484  virtual void _runStateCommand(std::string const & name, void* args=nullptr) = 0;
485 
486  virtual void showCurrentSopGeometry(bool value) = 0;
487  virtual bool isShowingCurrentSopGeometry() const = 0;
488 
489  virtual void showOperationBar(bool on) = 0 ;
490  virtual bool isShowingOperationBar() = 0 ;
491 
492  virtual void showColorCorrectionBar(bool on) = 0 ;
493  virtual bool isShowingColorCorrectionBar() = 0 ;
494 
495  virtual void showMemoryBar(bool on) = 0 ;
496  virtual bool isShowingMemoryBar() = 0 ;
497 
498  virtual void showDisplayOptionsBar(bool on) = 0 ;
499  virtual bool isShowingDisplayOptionsBar() = 0 ;
500 
501  virtual void showSelectionBar(bool on) = 0 ;
502  virtual bool isShowingSelectionBar() = 0 ;
503 
504  virtual void setIncludeColorCorrectionBar(bool on) = 0 ;
505  virtual bool includeColorCorrectionBar() = 0 ;
506 
507  virtual void setIncludeMemoryBar(bool on) = 0 ;
508  virtual bool includeMemoryBar() = 0 ;
509 
510  virtual void setGeometryVisibility( HOM_SopNode &sop, bool on ) = 0;
511  virtual bool geometryVisibility( HOM_SopNode &sop ) = 0;
512 
513  virtual bool usingOCIO() = 0;
514  virtual void setUsingOCIO(bool enable) = 0;
515 
516  SWIGOUT(%kwargs setOCIODisplayView;)
517  virtual void setOCIODisplayView(const char *display = nullptr,
518  const char *view = nullptr) = 0;
519  virtual std::string getOCIODisplay() = 0;
520  virtual std::string getOCIOView() = 0;
521 
522  virtual std::vector<int> geometry() = 0;
523 
524 #ifdef SWIG
525 %extend
526 {
527  SWIGOUT(%kwargs runStateCommand;)
528  virtual void runStateCommand(std::string const & name, InterpreterObject args=nullptr)
529  {
530  self->_runStateCommand(name, args);
531  }
532 }
533 #endif
534 
535  // Scene graph specific.
536  virtual bool isViewingSceneGraph() = 0;
537 #ifdef SWIG
538 %extend
539 {
540  SWIGOUT(%kwargs stage;)
541  InterpreterObject stage()
542  { return HOMincRef((InterpreterObject)self->opaqueStage()); }
543 }
544 #endif
545  SWIGOUT(%ignore opaqueStage;)
546  virtual void *opaqueStage() = 0;
547  virtual int stageSerial() = 0;
548  virtual void setShowGeometry(bool show) = 0;
549  virtual bool showGeometry() = 0;
550  virtual void setShowCameras(bool show) = 0;
551  virtual bool showCameras() = 0;
552  virtual void setShowLights(bool show) = 0;
553  virtual bool showLights() = 0;
554  virtual void setShowSelection(bool show) = 0;
555  virtual bool showSelection() = 0;
556  virtual void setShowRenderTime(bool show) = 0;
557  virtual bool showRenderTime() = 0;
558  virtual void setShowRenderStats(bool show) = 0;
559  virtual bool showRenderStats() = 0;
560 
561  virtual void setSelectionKind(const char *kind) = 0;
562  virtual void setSelectionPointInstances(bool topmost) = 0;
563  virtual std::string selectionKind() = 0;
564  virtual bool isSelectingPointInstances() = 0;
565  virtual bool isSelectingTopmostInstance() = 0;
566  virtual void setSelectionAllowKindMismatch(bool allow) = 0;
567  virtual bool selectionAllowKindMismatch() = 0;
568  virtual void setSelectionAllowInstanceProxies(bool allow) = 0;
569  virtual bool selectionAllowInstanceProxies() = 0;
570  virtual void setSelectionAllowHiddenPrims(bool allow) = 0;
571  virtual bool selectionAllowHiddenPrims() = 0;
572 
573  virtual void setStageControlsPlaybar(bool controls_playbar) = 0;
574  virtual bool stageControlsPlaybar() = 0;
575 
576  virtual std::vector<std::string> hydraRenderers() = 0;
577  virtual void setHydraRenderer(const std::string &ren_name) = 0;
578  virtual std::string currentHydraRenderer() = 0;
579  virtual bool isRendererPaused() = 0;
580  virtual void setRendererPaused(bool paused) = 0;
581  virtual void restartRenderer() = 0;
582  virtual void resetViewportCamera() = 0;
583 
584  SWIGOUT(%kwargs showProxyPurpose;)
585  virtual void showProxyPurpose(bool enable,
586  const char *renderer = nullptr) = 0;
587  SWIGOUT(%kwargs showGuidePurpose;)
588  virtual void showGuidePurpose(bool enable,
589  const char *renderer = nullptr) = 0;
590  SWIGOUT(%kwargs showRenderPurpose;)
591  virtual void showRenderPurpose(bool enable,
592  const char *renderer = nullptr) = 0;
593  SWIGOUT(%kwargs useViewportOverrides;)
594  virtual void useViewportOverrides(bool enable,
595  const char *renderer = nullptr) = 0;
596  SWIGOUT(%kwargs useViewportLoadMasks;)
597  virtual void useViewportLoadMasks(bool enable,
598  const char *renderer = nullptr) = 0;
599  SWIGOUT(%kwargs usePostLayers;)
600  virtual void usePostLayers(bool enable,
601  const char *renderer = nullptr) = 0;
602  SWIGOUT(%kwargs showingProxyPurpose;)
603  virtual bool showingProxyPurpose(const char *renderer = nullptr) = 0;
604  SWIGOUT(%kwargs showingGuidePurpose;)
605  virtual bool showingGuidePurpose(const char *renderer = nullptr) = 0;
606  SWIGOUT(%kwargs showingRenderPurpose;)
607  virtual bool showingRenderPurpose(const char *renderer = nullptr) = 0;
608  SWIGOUT(%kwargs usingViewportOverrides;)
609  virtual bool usingViewportOverrides(const char *renderer = nullptr) = 0;
610  SWIGOUT(%kwargs usingViewportLoadMasks;)
611  virtual bool usingViewportLoadMasks(const char *renderer = nullptr) = 0;
612  SWIGOUT(%kwargs usingPostLayers;)
613  virtual bool usingPostLayers(const char *renderer = nullptr) = 0;
614 
615  SWIGOUT(%ignore addOpaqueEventCallback;)
616  virtual void addOpaqueEventCallback(void *callback) = 0;
617  SWIGOUT(%ignore removeOpaqueEventCallback;)
618  virtual void removeOpaqueEventCallback(void *callback) = 0;
619  SWIGOUT(%ignore opaqueEventCallbacks;)
620  virtual std::vector<void *> opaqueEventCallbacks() = 0;
621  SWIGOUT(%ignore clearOpaqueEventCallbacks;)
622  virtual void clearOpaqueEventCallbacks() = 0;
623 
624 #ifdef SWIG
625 // expose the handling of the viewer callbacks to HOM
626 %extend
627 {
628  void addEventCallback(InterpreterObject callback)
629  {
630  self->addOpaqueEventCallback(callback);
631  }
632 
633  void removeEventCallback(InterpreterObject callback)
634  {
635  self->removeOpaqueEventCallback(callback);
636  }
637 
638  void clearEventCallbacks()
639  {
640  self->clearOpaqueEventCallbacks();
641  }
642 
643  std::vector<InterpreterObject> eventCallbacks()
644  {
645  std::vector<void *> opaque_callbacks(self->opaqueEventCallbacks());
646 
647  std::vector<InterpreterObject> callbacks;
648  for (int i = 0; i< opaque_callbacks.size(); ++i)
649  callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
650  return callbacks;
651  }
652 }
653 #endif
654 
655 #ifdef SWIG
656 %extend
657 {
658  InterpreterObject qtWindow()
659  {
660  return (InterpreterObject)self->opaqueQtWindow();
661  }
662 }
663 #endif
664 
665  SWIGOUT(%ignore opaqueQtWindow;)
666  virtual void *opaqueQtWindow() = 0;
667 
668  // HUD info method
669 #ifdef SWIG
670 %extend
671 {
672  SWIGOUT(%kwargs _hudInfo;)
673  void _hudInfo(int show=-1, bool terminate=false, int update_texture=0,
674  const HOM_EnumValue &hud_state=HOM_hudInfoState::NoState,
675  InterpreterObject hud_template=nullptr,
676  InterpreterObject hud_values=nullptr,
677  const HOM_EnumValue& hud_panel=HOM_hudPanel::ToolInfo,
678  bool update_hotkey_bindings=false)
679  {
680  self->hudInfoInternal(hud_state, show, terminate, update_texture,
681  hud_template, hud_values, hud_panel,
682  update_hotkey_bindings);
683  }
684 }
685 #endif
686  SWIGOUT(%ignore hudInfoInternal;)
687  virtual void hudInfoInternal(const HOM_EnumValue &hud_state, int show,
688  bool terminate, int update_texture,
689  void* hud_template, void* hud_values,
690  const HOM_EnumValue& hud_panel,
691  bool update_hotkey_bindings) = 0;
692 
693  SWIGOUT(%kwargs bindViewerHandle;)
694  virtual void bindViewerHandle(
695  std::string const& handle_type,
696  std::string const& handle_instance_name,
697  std::string const& settings=std::string(),
698  bool cache_previous_parms = false,
699  HandleParmNames const& handle_parms = HandleParmNames()) = 0;
700 
701  SWIGOUT(%kwargs bindViewerHandleStatic;)
702  virtual void bindViewerHandleStatic(
703  std::string const& handle_type,
704  std::string const& handle_instance_name,
705  Bindings const & bindings,
706  std::string const& settings=std::string() ) = 0;
707 
708  virtual void unbindViewerHandle(std::string const& handle_instance_name) = 0;
709 
710  virtual std::string fullName() = 0;
711 };
712 
713 #endif
GT_API const UT_StringHolder selection
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1303
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
GLenum GLenum GLsizei void * image
Definition: glad.h:5132
GLint y
Definition: glcorearb.h:103
std::tuple< Types...> UT_Tuple
Definition: UT_Tuple.h:53
GLint GLsizei GLsizei height
Definition: glcorearb.h:103
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1302
virtual std::string icon()=0
GLint GLuint mask
Definition: glcorearb.h:124
GLuint const GLchar * name
Definition: glcorearb.h:786
std::vector< std::string > HandleParmNames
GLint GLenum GLint x
Definition: glcorearb.h:409
HOM_SceneViewer(const HOM_SceneViewer &pane)
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
~HOM_SceneViewer() override
**If you just want to fire and args
Definition: thread.h:609
std::vector< std::pair< std::string, std::string > > Bindings
GLint GLsizei width
Definition: glcorearb.h:103
Definition: core.h:982
Definition: core.h:1131