9 #ifndef __HOM_SceneViewer_h__
10 #define __HOM_SceneViewer_h__
37 typedef std::vector< std::pair<std::string, std::string> >
Bindings;
60 virtual std::vector<HOM_ElemPtr<HOM_GeometryViewport> > viewports() = 0;
61 SWIGOUT(%newobject findViewport;)
63 SWIGOUT(%newobject curViewport;)
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,
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;
82 virtual std::vector<std::string> _getCurrentStateParmNames() = 0;
84 virtual bool _setCurrentStateParm(
const char *
name,
const char*
value) =0;
85 virtual bool _pressCurrentStateButton(
const char *
name)=0;
87 virtual bool isCreateInContext() = 0;
88 virtual bool isWorldSpaceLocal() = 0;
91 virtual void setViewportLayout(
HOM_EnumValue &layout,
int single = -1) = 0;
96 const char *prompt =
"Select objects",
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 *>(),
114 bool confirm_existing =
false,
115 const char *select_parm =
nullptr
118 SWIGOUT(%newobject selectGeometry;)
119 SWIGOUT(%kwargs selectGeometry;)
122 const char *prompt =
"Select geometry",
124 bool allow_drag =
false,
125 bool quick_select =
false,
126 bool use_existing_selection =
true,
127 const char *initial_selection = 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,
147 bool confirm_existing =
false,
148 bool pick_at_obj_level =
false,
149 const char *select_parm =
nullptr
152 SWIGOUT(%kwargs selectDynamics;)
155 const char *prompt =
"Select dynamics objects",
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 *>(),
172 const char *select_parm =
nullptr
175 SWIGOUT(%kwargs selectDynamicsPoints;)
178 selectDynamicsPoints(
179 const char *prompt =
"Select dynamics points",
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 *>(),
197 const char *select_parm =
nullptr
200 SWIGOUT(%kwargs selectDynamicsPolygons;)
203 selectDynamicsPolygons(
204 const char *prompt =
"Select dynamics polygons",
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 *>(),
220 const char *select_parm =
nullptr
223 SWIGOUT(%kwargs selectSceneGraph;)
224 virtual std::vector<std::string>
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,
242 HOM_optionalBool::NoOpinion,
244 HOM_optionalBool::NoOpinion,
245 bool fix_preselection_paths =
true
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
268 SWIGOUT(%newobject selectPositions;)
269 SWIGOUT(%kwargs 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,
279 const char *
icon = NULL,
280 const char *
label = NULL,
283 const char *select_parm =
nullptr
286 SWIGOUT(%kwargs selectOrientedPositions;)
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,
297 const char *
icon = NULL,
298 const char *
label = NULL,
301 const char *select_parm =
nullptr
305 SWIGOUT(%kwargs _selectDrawableGeometry;)
306 virtual void _selectDrawableGeometry(
void* drawable_selection,
HOM_EnumValue & selection_modifier) = 0;
310 SWIGOUT(%kwargs selectDrawableGeometry;)
311 virtual void selectDrawableGeometry(InterpreterObject drawable_selection,
312 HOM_EnumValue & selection_modifier=HOM_pickModifier::Replace)
314 self->_selectDrawableGeometry(drawable_selection, selection_modifier);
320 SWIGOUT(%newobject currentGeometrySelection;)
322 virtual std::string currentGeometrySelectionParm() =0;
324 virtual void setCurrentGeometrySelection(
326 const std::vector<HOM_Node *> &nodes,
327 const std::vector<HOM_Selection *> &selections) = 0;
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;
334 virtual std::vector<std::string> sceneGraphHighlight() = 0;
335 virtual void setSceneGraphHighlight(
const std::vector<std::string> &highlight) = 0;
340 HOM_scenePrimMask::ViewerSetting) = 0;
342 virtual bool sceneGraphStageLocked() = 0;
343 virtual void setSceneGraphStageLocked(
bool locked) = 0;
347 virtual void setSnappingMode(
HOM_EnumValue &snapping_mode) = 0;
349 virtual bool isSnappingToCurrentGeometry() = 0;
350 virtual void setSnapToCurrentGeometry(
bool on) = 0;
352 virtual bool isSnappingToTemplates() = 0;
353 virtual void setSnapToTemplates(
bool on) = 0;
355 virtual bool isSnappingToOtherObjects() = 0;
356 virtual void setSnapToOtherObjects(
bool on) = 0;
358 virtual bool isSnappingToGuides() = 0;
359 virtual void setSnapToGuides(
bool on) = 0;
361 virtual bool isDepthSnapping() = 0;
362 virtual void setDepthSnapping(
bool on) = 0;
364 virtual bool isOrientingOnSnap() = 0;
365 virtual void setOrientOnSnap(
bool on) = 0;
367 virtual float snappingGravity() = 0;
368 virtual std::vector<HOM_EnumValue*> snappingPriorities() = 0;
371 virtual bool isPickingVisibleGeometry() = 0;
372 virtual void setPickingVisibleGeometry(
bool on) = 0;
374 virtual bool isPickingContainedGeometry() = 0;
375 virtual void setPickingContainedGeometry(
bool on) = 0;
377 virtual bool isGroupPicking() = 0;
378 virtual void setGroupPicking(
bool on) = 0;
380 virtual bool isWholeGeometryPicking() = 0;
381 virtual void setWholeGeometryPicking(
bool on) = 0;
383 virtual bool isSecureSelection() = 0;
384 virtual void setSecureSelection(
bool on) = 0;
386 virtual bool isPickingCurrentNode() = 0;
387 virtual void setPickingCurrentNode(
bool on) = 0;
390 virtual void setPickGeometryType(
HOM_EnumValue &geometry_type) = 0;
402 virtual void setDefaultPickModifier(
HOM_EnumValue &modifier) = 0;
410 virtual bool isGroupListVisible() = 0;
411 virtual void setGroupListVisible(
bool on) = 0;
413 virtual bool isGroupListColoringGeometry() = 0;
414 virtual void setGroupListColoringGeometry(
bool on) = 0;
416 virtual bool isGroupListShowingEmptyGroups() = 0;
417 virtual void setGroupListShowingEmptyGroups(
bool on) = 0;
419 virtual bool isGroupListShowingOnlyPreSelectedGroups() = 0;
420 virtual void setGroupListShowingOnlyPreSelectedGroups(
bool on) = 0;
422 virtual bool isGroupListCondensingPathHierarchies() = 0;
423 virtual void setGroupListCondensingPathHierarchies(
bool on) = 0;
426 virtual void setGroupListSize(
double width,
double height) = 0;
429 virtual void setGroupListType(
HOM_EnumValue &group_list_type) = 0;
432 virtual void setGroupListMask(
const char *
mask) = 0;
435 SWIGOUT(%newobject constructionPlane;)
439 SWIGOUT(%newobject referencePlane;)
442 SWIGOUT(%newobject flipbookSettings;)
448 bool open_dialog =
false) = 0;
450 virtual void runShelfTool(
const char *tool_name) = 0;
452 virtual void beginStateUndo(
const char *
label) = 0;
453 virtual void endStateUndo() = 0;
455 virtual void setPromptMessage(
457 HOM_EnumValue const & msg_type = HOM_promptMessageType::Prompt) = 0;
458 virtual void clearPromptMessage() = 0;
461 virtual void flashMessage(
464 float duration = 1.0,
467 virtual std::vector<std::vector<std::string> >
468 hotkeyAssignments(
const std::vector<std::string> &hotkey_symbols) = 0;
474 virtual void openOptionDialog(
const char *
path,
const char *
label) = 0;
476 SWIGOUT(%kwargs triggerStateSelector;)
477 virtual void triggerStateSelector(
483 SWIGOUT(%kwargs _runStateCommand;)
486 virtual void showCurrentSopGeometry(
bool value) = 0;
487 virtual bool isShowingCurrentSopGeometry()
const = 0;
489 virtual void showOperationBar(
bool on) = 0 ;
490 virtual bool isShowingOperationBar() = 0 ;
492 virtual void showColorCorrectionBar(
bool on) = 0 ;
493 virtual bool isShowingColorCorrectionBar() = 0 ;
495 virtual void showMemoryBar(
bool on) = 0 ;
496 virtual bool isShowingMemoryBar() = 0 ;
498 virtual void showDisplayOptionsBar(
bool on) = 0 ;
499 virtual bool isShowingDisplayOptionsBar() = 0 ;
501 virtual void showSelectionBar(
bool on) = 0 ;
502 virtual bool isShowingSelectionBar() = 0 ;
504 virtual void setIncludeColorCorrectionBar(
bool on) = 0 ;
505 virtual bool includeColorCorrectionBar() = 0 ;
507 virtual void setIncludeMemoryBar(
bool on) = 0 ;
508 virtual bool includeMemoryBar() = 0 ;
510 virtual void setGeometryVisibility(
HOM_SopNode &sop,
bool on ) = 0;
511 virtual bool geometryVisibility(
HOM_SopNode &sop ) = 0;
513 virtual bool usingOCIO() = 0;
514 virtual void setUsingOCIO(
bool enable) = 0;
516 SWIGOUT(%kwargs setOCIODisplayView;)
517 virtual void setOCIODisplayView(
const char *display =
nullptr,
518 const char *
view =
nullptr) = 0;
522 virtual std::vector<int> geometry() = 0;
527 SWIGOUT(%kwargs runStateCommand;)
530 self->_runStateCommand(name,
args);
536 virtual bool isViewingSceneGraph() = 0;
541 InterpreterObject stage()
542 {
return HOMincRef((InterpreterObject)self->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;
561 virtual void setSelectionKind(
const char *kind) = 0;
562 virtual void setSelectionPointInstances(
bool topmost) = 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;
573 virtual void setStageControlsPlaybar(
bool controls_playbar) = 0;
574 virtual bool stageControlsPlaybar() = 0;
576 virtual std::vector<std::string> hydraRenderers() = 0;
577 virtual void setHydraRenderer(
const std::string &ren_name) = 0;
579 virtual bool isRendererPaused() = 0;
580 virtual void setRendererPaused(
bool paused) = 0;
581 virtual void restartRenderer() = 0;
582 virtual void resetViewportCamera() = 0;
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;
616 virtual void addOpaqueEventCallback(
void *callback) = 0;
618 virtual void removeOpaqueEventCallback(
void *callback) = 0;
620 virtual std::vector<void *> opaqueEventCallbacks() = 0;
622 virtual void clearOpaqueEventCallbacks() = 0;
628 void addEventCallback(InterpreterObject callback)
630 self->addOpaqueEventCallback(callback);
633 void removeEventCallback(InterpreterObject callback)
635 self->removeOpaqueEventCallback(callback);
638 void clearEventCallbacks()
640 self->clearOpaqueEventCallbacks();
643 std::vector<InterpreterObject> eventCallbacks()
645 std::vector<void *> opaque_callbacks(self->opaqueEventCallbacks());
647 std::vector<InterpreterObject> callbacks;
648 for (
int i = 0; i< opaque_callbacks.size(); ++i)
649 callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
658 InterpreterObject qtWindow()
660 return (InterpreterObject)
self->opaqueQtWindow();
666 virtual void *opaqueQtWindow() = 0;
673 void _hudInfo(
int show=-1,
bool terminate=
false,
int update_texture=0,
675 InterpreterObject hud_template=
nullptr,
676 InterpreterObject hud_values=
nullptr,
678 bool update_hotkey_bindings=
false)
680 self->hudInfoInternal(hud_state, show, terminate, update_texture,
681 hud_template, hud_values, hud_panel,
682 update_hotkey_bindings);
687 virtual void hudInfoInternal(
const HOM_EnumValue &hud_state,
int show,
688 bool terminate,
int update_texture,
689 void* hud_template,
void* hud_values,
691 bool update_hotkey_bindings) = 0;
693 SWIGOUT(%kwargs bindViewerHandle;)
694 virtual void bindViewerHandle(
698 bool cache_previous_parms =
false,
699 HandleParmNames
const& handle_parms = HandleParmNames()) = 0;
701 SWIGOUT(%kwargs bindViewerHandleStatic;)
702 virtual void bindViewerHandleStatic(
705 Bindings
const & bindings,
708 virtual void unbindViewerHandle(
std::string const& handle_instance_name) = 0;
GT_API const UT_StringHolder selection
#define HOM_DESTRUCT_OBJECT(pointer)
GLuint GLsizei const GLchar * label
GLsizei const GLchar *const * string
GLsizei const GLchar *const * path
string __repr__(VtArray< T > const &self)
GLenum GLenum GLsizei void * image
std::tuple< Types...> UT_Tuple
GLint GLsizei GLsizei height
void ignore(T const &) VULKAN_HPP_NOEXCEPT
#define HOM_CONSTRUCT_OBJECT(pointer)
virtual std::string icon()=0
GLuint const GLchar * name
std::vector< std::string > HandleParmNames
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
std::vector< std::pair< std::string, std::string > > Bindings