9 #ifndef __HOM_SceneViewer_h__
10 #define __HOM_SceneViewer_h__
41 typedef std::vector< std::pair<std::string, std::string> >
Bindings;
64 virtual std::vector<HOM_ElemPtr<HOM_GeometryViewport> > viewports() = 0;
65 SWIGOUT(%newobject findViewport;)
67 SWIGOUT(%newobject curViewport;)
71 virtual std::string currentState() = 0;
72 virtual void enterViewState(
bool wait_for_exit =
false) = 0;
73 virtual void enterCurrentNodeState(
bool wait_for_exit =
false) = 0;
74 virtual void enterTranslateToolState(
bool wait_for_exit =
false) = 0;
75 virtual void enterRotateToolState(
bool wait_for_exit =
false) = 0;
76 virtual void enterScaleToolState(
bool wait_for_exit =
false) = 0;
77 SWIGOUT(%kwargs setCurrentState;)
78 virtual void setCurrentState(
const char *
state,
bool wait_for_exit =
false,
80 HOM_stateGenerateMode::Insert,
81 bool request_new_on_generate =
false,
82 bool ex_situ_generate =
false) = 0;
83 virtual void _waitForStateExit(
const char *
state=NULL) = 0;
84 virtual std::string _currentBaseState() = 0;
86 virtual std::vector<std::string> _getCurrentStateParmNames() = 0;
87 virtual std::string _evalCurrentStateParm(
const char *
name) = 0;
88 virtual bool _setCurrentStateParm(
const char *
name,
const char*
value) =0;
89 virtual bool _pressCurrentStateButton(
const char *
name)=0;
91 virtual bool isCreateInContext() = 0;
92 virtual bool isWorldSpaceLocal() = 0;
95 virtual void setViewportLayout(
HOM_EnumValue &layout,
int single = -1) = 0;
100 const char *prompt =
"Select objects",
102 bool allow_drag =
false,
103 bool quick_select =
false,
104 bool use_existing_selection =
true,
105 bool allow_multisel =
true,
106 const std::vector<std::string> &allowed_types =
107 std::vector<std::string>(1,
"*"),
108 const char *
icon = NULL,
109 const char *
label = NULL,
110 const std::vector<std::string> &prior_selection_paths =
111 std::vector<std::string>(),
112 const std::vector<std::string> &prior_selection_ids =
113 std::vector<std::string>(),
114 const std::vector<HOM_Selection *> &prior_selections =
115 std::vector<HOM_Selection *>(),
118 bool confirm_existing =
false,
119 const char *select_parm =
nullptr
122 SWIGOUT(%newobject selectGeometry;)
123 SWIGOUT(%kwargs selectGeometry;)
126 const char *prompt =
"Select geometry",
128 bool allow_drag =
false,
129 bool quick_select =
false,
130 bool use_existing_selection =
true,
131 const char *initial_selection = NULL,
133 bool ordered =
false,
134 const std::vector<HOM_EnumValue *> geometry_types =
135 std::vector<HOM_EnumValue *>(),
136 const std::vector<HOM_EnumValue *> primitive_types =
137 std::vector<HOM_EnumValue *>(),
138 bool allow_obj_sel =
true,
139 const char *
icon = NULL,
140 const char *
label = NULL,
141 const std::vector<std::string> &prior_selection_paths =
142 std::vector<std::string>(),
143 const std::vector<std::string> &prior_selection_ids =
144 std::vector<std::string>(),
145 const std::vector<HOM_Selection *> &prior_selections =
146 std::vector<HOM_Selection *>(),
147 bool allow_other_sops =
true,
148 bool consume_selections =
true,
151 bool confirm_existing =
false,
152 bool pick_at_obj_level =
false,
153 const char *select_parm =
nullptr
156 SWIGOUT(%kwargs selectDynamics;)
159 const char *prompt =
"Select dynamics objects",
161 bool allow_objects =
true,
162 bool allow_modifiers =
false,
163 bool quick_select =
false,
164 bool use_existing_selection =
true,
165 bool allow_multisel =
true,
166 const char *
icon = NULL,
167 const char *
label = NULL,
168 const std::vector<std::string> &prior_selection_paths =
169 std::vector<std::string>(),
170 const std::vector<std::string> &prior_selection_ids =
171 std::vector<std::string>(),
172 const std::vector<HOM_Selection *> &prior_selections =
173 std::vector<HOM_Selection *>(),
176 const char *select_parm =
nullptr
179 SWIGOUT(%kwargs selectDynamicsPoints;)
182 selectDynamicsPoints(
183 const char *prompt =
"Select dynamics points",
185 bool quick_select =
false,
186 bool use_existing_selection =
true,
187 bool allow_multisel =
true,
188 bool only_select_points =
true,
189 bool object_based_point_selection =
false,
190 bool use_last_selected_object =
false,
191 const char *
icon = NULL,
192 const char *
label = NULL,
193 const std::vector<std::string> &prior_selection_paths =
194 std::vector<std::string>(),
195 const std::vector<std::string> &prior_selection_ids =
196 std::vector<std::string>(),
197 const std::vector<HOM_Selection *> &prior_selections =
198 std::vector<HOM_Selection *>(),
201 const char *select_parm =
nullptr
204 SWIGOUT(%kwargs selectDynamicsPolygons;)
207 selectDynamicsPolygons(
208 const char *prompt =
"Select dynamics polygons",
210 bool quick_select =
false,
211 bool use_existing_selection =
true,
212 bool object_based_point_selection =
false,
213 bool use_last_selected_object =
false,
214 const char *
icon = NULL,
215 const char *
label = NULL,
216 const std::vector<std::string> &prior_selection_paths =
217 std::vector<std::string>(),
218 const std::vector<std::string> &prior_selection_ids =
219 std::vector<std::string>(),
220 const std::vector<HOM_Selection *> &prior_selections =
221 std::vector<HOM_Selection *>(),
224 const char *select_parm =
nullptr
227 SWIGOUT(%kwargs selectSceneGraph;)
228 virtual std::vector<std::string>
230 const char *prompt =
"Select primitives",
231 const std::vector<std::string> &preselection =
232 std::vector<std::string>(),
233 const HOM_EnumValue &prim_mask= HOM_scenePrimMask::ViewerSetting,
234 bool quick_select =
false,
235 bool use_existing_selection =
true,
236 bool confirm_existing =
false,
237 bool allow_multisel =
true,
238 bool allow_drag =
true,
239 bool allow_selection_type_changes =
false,
240 bool propagate_selection =
true,
241 const char *path_prefix_mask =
nullptr,
242 const char *prim_kind =
nullptr,
243 HOM_Node *validate_selection_for_node =
nullptr,
244 const char *select_parm =
nullptr,
246 HOM_optionalBool::NoOpinion,
248 HOM_optionalBool::NoOpinion,
249 bool fix_preselection_paths =
true
252 SWIGOUT(%kwargs selectSceneGraphInstances;)
253 virtual std::vector<std::string>
254 selectSceneGraphInstances(
255 const char *prompt =
"Select point instances",
256 const std::vector<std::string> &preselection =
257 std::vector<std::string>(),
258 bool quick_select =
false,
259 bool use_existing_selection =
true,
260 bool confirm_existing =
false,
261 bool allow_multisel =
true,
262 bool allow_drag =
true,
263 bool allow_selection_type_changes =
false,
264 const char *path_prefix_mask =
nullptr,
265 int instance_level = 0,
266 bool instance_indices_only =
false,
267 HOM_Node *validate_selection_for_node =
nullptr,
268 const char *select_parm =
nullptr
272 SWIGOUT(%newobject selectPositions;)
273 SWIGOUT(%kwargs selectPositions;)
276 const char *prompt =
"Click to specify a position",
277 int number_of_positions = 1,
278 int min_number_of_positions = -1,
279 bool connect_positions =
true,
280 bool show_coordinates =
true,
283 const char *
icon = NULL,
284 const char *
label = NULL,
287 const char *select_parm =
nullptr
290 SWIGOUT(%kwargs selectOrientedPositions;)
293 selectOrientedPositions(
294 const char *prompt =
"Click to specify a position",
295 int number_of_positions = 1,
296 int min_number_of_positions = -1,
297 bool connect_positions =
true,
298 bool show_coordinates =
true,
301 const char *
icon = NULL,
302 const char *
label = NULL,
305 const char *select_parm =
nullptr
309 SWIGOUT(%kwargs _selectDrawableGeometry;)
310 virtual void _selectDrawableGeometry(
void* drawable_selection,
HOM_EnumValue & selection_modifier) = 0;
314 SWIGOUT(%kwargs selectDrawableGeometry;)
315 virtual void selectDrawableGeometry(InterpreterObject drawable_selection,
316 HOM_EnumValue & selection_modifier=HOM_pickModifier::Replace)
318 self->_selectDrawableGeometry(drawable_selection, selection_modifier);
324 SWIGOUT(%newobject currentGeometrySelection;)
326 virtual std::string currentGeometrySelectionParm() =0;
328 virtual void setCurrentGeometrySelection(
330 const std::vector<HOM_Node *> &nodes,
331 const std::vector<HOM_Selection *> &selections) = 0;
333 virtual std::vector<std::string> currentSceneGraphSelection() = 0;
334 virtual void setCurrentSceneGraphSelection(
335 const std::vector<std::string> &
selection,
336 bool fix_selection_paths =
true) = 0;
338 virtual std::vector<std::string> sceneGraphHighlight() = 0;
339 virtual void setSceneGraphHighlight(
const std::vector<std::string> &highlight) = 0;
344 HOM_scenePrimMask::ViewerSetting) = 0;
346 virtual bool sceneGraphStageLocked() = 0;
347 virtual void setSceneGraphStageLocked(
bool locked) = 0;
351 virtual void setSnappingMode(
HOM_EnumValue &snapping_mode) = 0;
353 virtual bool isSnappingToCurrentGeometry() = 0;
354 virtual void setSnapToCurrentGeometry(
bool on) = 0;
356 virtual bool isSnappingToTemplates() = 0;
357 virtual void setSnapToTemplates(
bool on) = 0;
359 virtual bool isSnappingToOtherObjects() = 0;
360 virtual void setSnapToOtherObjects(
bool on) = 0;
362 virtual bool isSnappingToGuides() = 0;
363 virtual void setSnapToGuides(
bool on) = 0;
365 virtual bool isDepthSnapping() = 0;
366 virtual void setDepthSnapping(
bool on) = 0;
368 virtual bool isOrientingOnSnap() = 0;
369 virtual void setOrientOnSnap(
bool on) = 0;
371 virtual float snappingGravity() = 0;
372 virtual std::vector<HOM_EnumValue*> snappingPriorities() = 0;
375 virtual bool isPickingVisibleGeometry() = 0;
376 virtual void setPickingVisibleGeometry(
bool on) = 0;
378 virtual bool isPickingContainedGeometry() = 0;
379 virtual void setPickingContainedGeometry(
bool on) = 0;
381 virtual bool isGroupPicking() = 0;
382 virtual void setGroupPicking(
bool on) = 0;
384 virtual bool isWholeGeometryPicking() = 0;
385 virtual void setWholeGeometryPicking(
bool on) = 0;
387 virtual bool isSecureSelection() = 0;
388 virtual void setSecureSelection(
bool on) = 0;
390 virtual bool isPickingCurrentNode() = 0;
391 virtual void setPickingCurrentNode(
bool on) = 0;
394 virtual void setPickGeometryType(
HOM_EnumValue &geometry_type) = 0;
406 virtual void setDefaultPickModifier(
HOM_EnumValue &modifier) = 0;
414 virtual bool isGroupListVisible() = 0;
415 virtual void setGroupListVisible(
bool on) = 0;
417 virtual bool isGroupListColoringGeometry() = 0;
418 virtual void setGroupListColoringGeometry(
bool on) = 0;
420 virtual bool isGroupListShowingEmptyGroups() = 0;
421 virtual void setGroupListShowingEmptyGroups(
bool on) = 0;
423 virtual bool isGroupListShowingOnlyPreSelectedGroups() = 0;
424 virtual void setGroupListShowingOnlyPreSelectedGroups(
bool on) = 0;
426 virtual bool isGroupListCondensingPathHierarchies() = 0;
427 virtual void setGroupListCondensingPathHierarchies(
bool on) = 0;
430 virtual void setGroupListSize(
double width,
double height) = 0;
433 virtual void setGroupListType(
HOM_EnumValue &group_list_type) = 0;
435 virtual std::string groupListMask() = 0;
436 virtual void setGroupListMask(
const char *
mask) = 0;
439 SWIGOUT(%newobject constructionPlane;)
443 SWIGOUT(%newobject referencePlane;)
446 SWIGOUT(%newobject flipbookSettings;)
452 bool open_dialog =
false) = 0;
454 virtual void runShelfTool(
const char *tool_name) = 0;
456 virtual void beginStateUndo(
const char *
label) = 0;
457 virtual void endStateUndo() = 0;
459 virtual void setPromptMessage(
460 std::string
const & msg,
461 HOM_EnumValue const & msg_type = HOM_promptMessageType::Prompt) = 0;
462 virtual void clearPromptMessage() = 0;
465 virtual void flashMessage(
466 std::string
const &
image,
467 std::string
const &msg,
468 float duration = 1.0,
471 virtual std::vector<std::vector<std::string> >
472 hotkeyAssignments(
const std::vector<std::string> &hotkey_symbols) = 0;
474 virtual void showHandle( std::string
const&
name,
bool value ) = 0;
478 virtual void openOptionDialog(
const char *
path,
const char *
label) = 0;
480 SWIGOUT(%kwargs triggerStateSelector;)
481 virtual void triggerStateSelector(
483 std::string
const &
name=std::string()) = 0;
484 virtual std::string currentStateSelector() = 0;
487 SWIGOUT(%kwargs _runStateCommand;)
488 virtual void _runStateCommand(std::string
const &
name,
void*
args=
nullptr) = 0;
490 virtual void showCurrentSopGeometry(
bool value) = 0;
491 virtual bool isShowingCurrentSopGeometry()
const = 0;
493 virtual void showOperationBar(
bool on) = 0 ;
494 virtual bool isShowingOperationBar() = 0 ;
496 virtual void showColorCorrectionBar(
bool on) = 0 ;
497 virtual bool isShowingColorCorrectionBar() = 0 ;
499 virtual void showMemoryBar(
bool on) = 0 ;
500 virtual bool isShowingMemoryBar() = 0 ;
502 virtual void showDisplayOptionsBar(
bool on) = 0 ;
503 virtual bool isShowingDisplayOptionsBar() = 0 ;
505 virtual void showSelectionBar(
bool on) = 0 ;
506 virtual bool isShowingSelectionBar() = 0 ;
508 virtual void setIncludeColorCorrectionBar(
bool on) = 0 ;
509 virtual bool includeColorCorrectionBar() = 0 ;
511 virtual void setIncludeMemoryBar(
bool on) = 0 ;
512 virtual bool includeMemoryBar() = 0 ;
514 virtual void setGeometryVisibility(
HOM_SopNode &sop,
bool on ) = 0;
515 virtual bool geometryVisibility(
HOM_SopNode &sop ) = 0;
517 virtual bool usingOCIO() = 0;
518 virtual void setUsingOCIO(
bool enable) = 0;
520 SWIGOUT(%kwargs setOCIODisplayView;)
521 virtual void setOCIODisplayView(
const char *display =
nullptr,
522 const char *view =
nullptr) = 0;
523 virtual std::string getOCIODisplay() = 0;
524 virtual std::string getOCIOView() = 0;
526 virtual std::vector<int> geometry() = 0;
528 SWIGOUT(%newobject createFloatingViewport;)
530 std::vector<int> pos)=0;
535 SWIGOUT(%kwargs runStateCommand;)
536 virtual void runStateCommand(std::string
const &
name, InterpreterObject
args=
nullptr)
538 self->_runStateCommand(name,
args);
544 virtual bool isViewingSceneGraph() = 0;
549 InterpreterObject stage()
550 {
return HOMincRef((InterpreterObject)self->opaqueStage()); }
554 virtual void *opaqueStage() = 0;
555 virtual int stageSerial() = 0;
556 virtual void setShowGeometry(
bool show) = 0;
557 virtual bool showGeometry() = 0;
558 virtual void setShowCameras(
bool show) = 0;
559 virtual bool showCameras() = 0;
560 virtual void setShowLights(
bool show) = 0;
561 virtual bool showLights() = 0;
562 virtual void setShowSelection(
bool show) = 0;
563 virtual bool showSelection() = 0;
564 virtual void setShowRenderTime(
bool show) = 0;
565 virtual bool showRenderTime() = 0;
566 virtual void setShowRenderStats(
bool show) = 0;
567 virtual bool showRenderStats() = 0;
569 virtual void setSelectionKind(
const char *kind) = 0;
570 virtual void setSelectionPointInstances(
bool topmost) = 0;
571 virtual std::string selectionKind() = 0;
572 virtual bool isSelectingPointInstances() = 0;
573 virtual bool isSelectingTopmostInstance() = 0;
574 virtual void setSelectionAllowKindMismatch(
bool allow) = 0;
575 virtual bool selectionAllowKindMismatch() = 0;
576 virtual void setSelectionAllowInstanceProxies(
bool allow) = 0;
577 virtual bool selectionAllowInstanceProxies() = 0;
578 virtual void setSelectionAllowHiddenPrims(
bool allow) = 0;
579 virtual bool selectionAllowHiddenPrims() = 0;
581 virtual void setStageControlsPlaybar(
bool controls_playbar) = 0;
582 virtual bool stageControlsPlaybar() = 0;
584 virtual std::vector<std::string> hydraRenderers() = 0;
585 virtual void setHydraRenderer(
const std::string &ren_name) = 0;
586 virtual std::string currentHydraRenderer() = 0;
587 virtual bool isRendererPaused() = 0;
588 virtual void setRendererPaused(
bool paused) = 0;
589 virtual void restartRenderer() = 0;
590 virtual void resetViewportCamera() = 0;
592 SWIGOUT(%kwargs showProxyPurpose;)
593 virtual void showProxyPurpose(
bool enable,
594 const char *renderer =
nullptr) = 0;
595 SWIGOUT(%kwargs showGuidePurpose;)
596 virtual void showGuidePurpose(
bool enable,
597 const char *renderer =
nullptr) = 0;
598 SWIGOUT(%kwargs showRenderPurpose;)
599 virtual void showRenderPurpose(
bool enable,
600 const char *renderer =
nullptr) = 0;
601 SWIGOUT(%kwargs useViewportOverrides;)
602 virtual void useViewportOverrides(
bool enable,
603 const char *renderer =
nullptr) = 0;
604 SWIGOUT(%kwargs useViewportLoadMasks;)
605 virtual void useViewportLoadMasks(
bool enable,
606 const char *renderer =
nullptr) = 0;
607 SWIGOUT(%kwargs usePostLayers;)
608 virtual void usePostLayers(
bool enable,
609 const char *renderer =
nullptr) = 0;
610 SWIGOUT(%kwargs showMaterials;)
611 virtual void showMaterials(
bool enable,
612 const char *renderer =
nullptr) = 0;
613 SWIGOUT(%kwargs showingProxyPurpose;)
614 virtual bool showingProxyPurpose(
const char *renderer =
nullptr) = 0;
615 SWIGOUT(%kwargs showingGuidePurpose;)
616 virtual bool showingGuidePurpose(
const char *renderer =
nullptr) = 0;
617 SWIGOUT(%kwargs showingRenderPurpose;)
618 virtual bool showingRenderPurpose(
const char *renderer =
nullptr) = 0;
619 SWIGOUT(%kwargs usingViewportOverrides;)
620 virtual bool usingViewportOverrides(
const char *renderer =
nullptr) = 0;
621 SWIGOUT(%kwargs usingViewportLoadMasks;)
622 virtual bool usingViewportLoadMasks(
const char *renderer =
nullptr) = 0;
623 SWIGOUT(%kwargs usingPostLayers;)
624 virtual bool usingPostLayers(
const char *renderer =
nullptr) = 0;
625 SWIGOUT(%kwargs showingMaterials;)
626 virtual bool showingMaterials(
const char *renderer =
nullptr) = 0;
629 virtual void addOpaqueEventCallback(
void *callback) = 0;
631 virtual void removeOpaqueEventCallback(
void *callback) = 0;
633 virtual std::vector<void *> opaqueEventCallbacks() = 0;
635 virtual void clearOpaqueEventCallbacks() = 0;
641 void addEventCallback(InterpreterObject callback)
643 self->addOpaqueEventCallback(callback);
646 void removeEventCallback(InterpreterObject callback)
648 self->removeOpaqueEventCallback(callback);
651 void clearEventCallbacks()
653 self->clearOpaqueEventCallbacks();
656 std::vector<InterpreterObject> eventCallbacks()
658 std::vector<void *> opaque_callbacks(self->opaqueEventCallbacks());
660 std::vector<InterpreterObject> callbacks;
661 for (
int i = 0; i< opaque_callbacks.size(); ++i)
662 callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
671 InterpreterObject qtWindow()
673 return (InterpreterObject)
self->opaqueQtWindow();
679 virtual void *opaqueQtWindow() = 0;
686 void _hudInfo(
int show=-1,
bool terminate=
false,
int update_texture=0,
688 InterpreterObject hud_template=
nullptr,
689 InterpreterObject hud_values=
nullptr,
691 bool update_hotkey_bindings=
false)
693 self->hudInfoInternal(hud_state, show, terminate, update_texture,
694 hud_template, hud_values, hud_panel,
695 update_hotkey_bindings);
700 virtual void hudInfoInternal(
const HOM_EnumValue &hud_state,
int show,
701 bool terminate,
int update_texture,
702 void* hud_template,
void* hud_values,
704 bool update_hotkey_bindings) = 0;
706 SWIGOUT(%kwargs bindViewerHandle;)
707 virtual void bindViewerHandle(
708 std::string
const& handle_type,
709 std::string
const& handle_instance_name,
710 std::string
const& settings=std::string(),
711 bool cache_previous_parms =
false,
712 HandleParmNames
const& handle_parms = HandleParmNames()) = 0;
714 SWIGOUT(%kwargs bindViewerHandleStatic;)
715 virtual void bindViewerHandleStatic(
716 std::string
const& handle_type,
717 std::string
const& handle_instance_name,
718 Bindings
const & bindings,
719 std::string
const& settings=std::string() ) = 0;
721 virtual void unbindViewerHandle(std::string
const& handle_instance_name) = 0;
723 virtual std::string fullName() = 0;
725 virtual void _setSlapcomp(
HOM_Node *node) = 0;
GT_API const UT_StringHolder selection
#define HOM_DESTRUCT_OBJECT(pointer)
GLuint GLsizei const GLchar * label
GLsizei const GLfloat * value
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