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