Inheritence |
|
Methods
Prompting for a selection
selectObjects(prompt='Select objects', sel_index=0, allow_drag=False, quick_select=False, use_existing_selection=True, allow_multisel=True, allowed_types=('*',), icon=None, label=None, prior_selection_paths=[], prior_selection_ids=[], prior_selections=[])
→ tuple of Nodes
selectGeometry(prompt='Select geometry', sel_index=0, allow_drag=False, quick_select=False, use_existing_selection=True, initial_selection = None, initial_selection_type = None, ordered=False, geometry_types=(), primitive_types=(), allow_obj_sel=True, icon=None, label=None, prior_selection_paths=[], prior_selection_ids=[], prior_selections=[], allow_other_sops=True, consume_selections=True)
→ GeometrySelection
selectPositions(prompt='Click to specify a position', number_of_positions=1, connect_positions=True, show_coordinates=True, bbox=BoundingBox(), position_type=positionType.WorldSpace, icon=None, label=None)
→ tuple of Vector3s
selectDynamics(prompt='Select dynamics objects', sel_index=0, allow_objects=True, allow_modifiers=False, quick_select=False, use_existing_selection=True, allow_multisel=True, icon=None, label=None, prior_selection_paths=[], prior_selection_ids=[], prior_selections=[])
→ tuple of hou.DopData
selectDynamicsPoints(prompt='Select dynamics points', sel_index=0, quick_select=False, use_existing_selection=True, allow_multisel=True, only_select_points=True, object_based_point_selection=False, use_last_selected_object=False, icon=None, label=None, prior_selection_paths=[], prior_selection_ids=[], prior_selections=[])
→ tuple of (hou.DopData, hou.GeometrySelection)
selectDynamicsPolygons(prompt='Select dynamics polygons', sel_index=0, quick_select=False, use_existing_selection=True, object_based_point_selection=False, use_last_selected_object=False, icon=None, label=None, prior_selection_paths=[], prior_selection_ids=[], prior_selections=[])
→ tuple of (hou.DopData, hou.GeometrySelection)
Selection utils
currentGeometrySelection()
→ hou.GeometrySelection
Returns the current geometry selection if the viewer is in a geometry select mode and otherwise returns None.
setCurrentGeometrySelection(geometry_type, nodes, selections)
Replaces a current geometry selection if the viewer is in a geometry select mode and otherwise raises hou.NotAvailable. Any of the specified selections not matching geometry_type will be automatically converted to that type where possible.
Tool state
currentState()
→ string
Returns the name of the viewer’s current tool state.
setCurrentState(state, wait_for_exit=False, generate=hou.stateGenerateMode.Insert, request_new_on_generate=True)
Sets the current tool state of the viewer. If wait_for_exit is True, then the function will not return until the viewer exits the tool.
generate
A hou.stateGenerateMode enumeration value to specify how a new node should be generated, inserted inline or into a new branch.
request_new_on_generate
Some states reuse the current node whenever possible. Setting this argument to True requests that such states generate a new node.
enterCurrentNodeState(wait_for_exit=False)
Enters the viewer into the node-specific tool state of the last selected node. If wait_for_exit is True, then the function will not return until the viewer exits the tool.
enterViewState(wait_for_exit=False)
Enters the viewer into view tool state. If wait_for_exit is True, then the function will not return until the viewer exits the tool.
enterTranslateToolState(wait_for_exit=False)
Enters the viewer into translate tool state. This is available only for the node contexts that support the move tools. If wait_for_exit is True, then the function will not return until the viewer exits the tool.
enterRotateToolState(wait_for_exit=False)
Enters the viewer into rotate tool state. This is available only for the node contexts that support the move tools. If wait_for_exit is True, then the function will not return until the viewer exits the tool.
enterScaleToolState(wait_for_exit=False)
Enters the viewer into scale tool state. This is available only for the node contexts that support the move tools. If wait_for_exit is True, then the function will not return until the viewer exits the tool.
Modeling
constructionPlane()
→ hou.ConstructionPlane
Return the construction plane (or grid) in the perspective viewport of this viewer.
See hou.ConstructionPlane for more information.
Split views
curViewport()
→ hou.GeometryViewport
Returns this viewer’s current viewport. The current viewport is the one containing the mouse cursor. If the cursor is not in a viewport, then the selected, or active, viewport is returned.
setCurViewport(viewport)
linkOrthoViewports()
setLinkOrthoViewports(on)
viewportLayout()
→ hou.geometryViewportLayout
Returns the current viewport layout as a hou.geometryViewportLayout value.
setViewportLayout(layout, single=-1)
Sets the viewer’s viewport layout.
layout
A hou.geometryViewportLayout value. For example, to set the viewer to show four viewports at the corners:
viewer_pane.setViewportLayout(hou.geometryViewportLayout.Quad)
single
If you specify the /hom/hou/hou.geometryViewportLayout#Single layout, this argument lets you specify which of the four viewports from the quad view to show as the single
|
Use the current viewport (the viewport the mouse is/was over). |
|
Use the top-left viewport from the quad layout (usually the Top view). |
|
Use the top-right viewport from the quad layout (usually the Perspective view). |
|
Use the bottom-left viewport from the quad layout (usually the Front view). |
|
Use the bottom-right viewport from the quad layout (usually the Right view). |
appliesToAllSplitViews()
setApplyToAllSplitViews(on)
Snapping
snappingMode()
setSnappingMode(snapping_mode)
isSnappingToTemplates()
setSnapToTemplates(on)
isSnappingToOtherObjects()
setSnapToOtherObjects(on)
isDepthSnapping()
setDepthSnapping(on)
isOrientingOnSnap()
setOrientOnSnap(on)
View options
isPickingVisibleGeometry()
Returns true if the viewer is configured to only pick visible components when performing an area-based selection. This option corresponds to the matching check box in the component selection button’s context menu.
setPickingVisibleGeometry(on)
Turns on or off the option to select only visible components when performing area-based selections such as box or brush picking.
isPickingContainedGeometry()
Returns true if the viewer is configured to only pick fully contained components when performing an area-based selection. This option corresponds to the matching check box in the component selection button’s context menu.
setPickingContainedGeometry(on)
Turns on or off the option to select only fully contained components when performing area-based selections such as box or brush picking.
selectionMode()
Returns the selection mode of the viewer of type hou.selectionMode.
setSelectionMode(selection_mode)
Sets the selection mode of this view. The value for 'selection_mode' must be from hou.selectionMode.
isGroupPicking()
Returns true if group, attribute, or connectivity information will be used to automatically expand selections made in this viewer. This option corresponds to the matching check box in the component selection button’s context menu.
setGroupPicking(on)
Turns on or off the group, attribute, or connectivity based picking. When turned on, the group list gadget is automatically made visible.
isWholeGeometryPicking()
Returns true if selections made in this viewer will automatically expand to include the whole geometry. This option corresponds to the matching check box in the component selection button’s context menu.
setWholeGeometryPicking(on)
Turns on or off the option to expand selections made in this viewer to include the entire geometry.
isSecureSelection()
Returns true if secure selection is turned on in this viewer. This option corresponds to the secure selection option in the select tool’s context menu.
setSecureSelection(on)
Turns on or off the secure selection option in this viewer.
isPickingCurrentNode()
Returns true if selections made in this viewer will pick from the Current SOP. If not, the pick occurs on the Display SOP. This option corresponds to the current/display option in the component selection button’s context menu.
setPickingCurrentNode(on)
Tells this viewer whether picks should be made on the Current SOP or on the Display SOP.
pickGeometryType()
Returns the type of geometry that will be picked in this viewer. This option corresponds to the component types selectable in the component selection button’s context menu.
setPickGeometryType(geometry_type)
Sets the type of geometry that will be picked in this viewer. This value can be changed at any time by the user, or when a selector is invoked.
pickStyle()
Returns the style of area picking currently being used by this viewer. This option corresponds to the picking style specified in the select tool’s context menu.
setPickStyle(style)
Sets the style of area picking to be used by this viewer.
pickModifier()
Returns the manner in which additional selection are combined with the existing selection. This option corresponds to the picking modifier in the select tool context menu.
setPickModifier(modifier)
Sets the method used to modify the existing selection when a new selection is made. Modifier keys can still be used to alter this behavior. Only the default operation (with no modifier keys) is affected by this setting. Note that the select state will revert to the default pick modifier upon termination, so to make your change persist beyond this you will also need to change this default using setDefaultPickModifier().
defaultPickModifier()
Returns the default pick modifier to which Houdini will revert after a select state terminates.
setDefaultPickModifier(modifier)
Sets the default pick modifier to which Houdini will revert after a select state terminates.
pickFacing()
Returns a value indicating whether the user is able to pick front facing components, back facing components, or both. This option corresponds to the frant and back facing options in the component selection button’s context menu.
setPickFacing(facing)
Sets the option of whether to restrict selection to front facing, back facing, or either type of components.
isShowingObjectsAtSopLevel()
setShowObjectsAtSopLevel(on)
isCreateInContext() -> bool
displayedNodeBehaviour()
setDisplayedNodeBehaviour(behaviour)
Group list
isGroupListVisible()
Returns true if the group list gadget has been turned on for this viewer. This function only refers to the option to show the group list when not selecting groups in the viewer. In that case the group list will be visible, but this function may still return False.
setGroupListVisible(on)
Turns on or off the group list gadget for this viewer.
isGroupListColoringGeometry()
Returns true if the group list gadget is configured to color geometry in the viewer based on group membership or attribute value.
setGroupListColoringGeometry(on)
Turns on or off the group list gadget to coloring of geometry in the viewer based on group membership or attribute value.
isGroupListShowingEmptyGroups()
Returns true if the group list gadget is including empty groups in its list.
setGroupListShowingEmptyGroups(on)
Turns on or off the display of empty groups in the group list gadget.
isGroupListShowingOnlyPreSelectedGroups()
Returns true if the group list is showing only groups that contain one or more selected or pre-selected components.
setGroupListShowingOnlyPreSelectedGroups(on)
Turns on or off the trimming of the group list to show only groups that contain one or more selected or pre-selected components.
isGroupListCondensingPathHierarchies()
Returns true if the group list will condense the hierarchy of groups defined by a string attribute representing a path.
setGroupListCondensingPathHierarchies(on)
Turns on or off the condensing of the hierarchy in the group list. This applies to components grouped by string attributes representing a path. Turning this option on can fit more information into the list, but can make it harder to distinguish levels in the hierarchy.
groupListSize()
Returns the width and height in inches of the group list gadget.
setGroupListSize(width, height)
Sets the size in inches of the group list gadget.
groupListType()
Returns the type of component listed in the group list gadget.
setGroupListType(group_list_type)
Sets the type of component listed in the group list gadget. This can be set to a specific component type or to follow the current component selection type.
groupListMask()
Returns true if the group list gadget has been turned on for this viewer.
setGroupListMask(mask)
Sets the mask value in the group list gadget for this viewer. This can be a filter applied to the comonent groups, or an attribute name (starting with an @ charater), or a connectivity type.
Memories and snapshots
memories()
→ dict of ints to GeometryViewportSettings
createMemoryFromViewport(viewport, number)
→ GeometryViewportSettings
loadFromMemoryToViewport(viewport, number)
deleteAllMemories()
showsMemoriesAtBottom()
setShowMemoriesAtBottom(on)
createSnapshotFromViewport(viewport, number)
showSnapshot(number)
hideSnapshot(number)
showsSnapshotsAtSourceFrame()
setShowSnapshotsAtSourceFrame(on)
snapshotAlphaBlend()
setSnapshotAlphaBlend(alpha)
snapshotObjectMask()
setSnapshotObjectMask(mask)
showsHandlesInSnapshots()
setShowHandlesInSnapshots(on)
Quick renders and flipbooks
render()
renderOutput()
setRenderOutputToBuiltIn(renderer)
setRenderOutputToRop(rop_node)
setFlipbookOptions(options)
flipbookSettings()
→ hou.FlipbookSettings
Access to the flipbook dialog settings, which can be queried, set, or copied.
flipbook(viewport=None, settings=None, open_dialog=False)
Capture a flipbook. A flipbook creates a quick preview animation by taking consecutive screenshots of a viewport at each frame.
viewport
A
Launch a flipbook for viewport
if specified or the current viewport if
viewport
is not. Optionally a hou.FlipbookSettings object can be passed to
settings
which will override the current settings. This override will
only affect the current flipbook and not change the dialog settings.
If open_dialog
is True, the flipbook dialog is presented to the user,
otherwise a flipbook is launched immediately.
Toolbars
showsNodeToolbarAtTop()
setShowNodeToolbarAtTop(on)
showsPathAtTop()
setShowPathAtTop(on)
showsToolsAtBottom()
setShowToolsAtBottom(on)
showsDisplayToolsAtRight()
setShowDisplayToolsAtRight(on)
showsSelectionToolsAtLeft()
setShowSelectionToolsAtLeft(on)
Interaction
runShelfTool(tool_name)
Run the named shelf tool in the current viewport.
displayRadialMenu(name)
Launch the named radial menu in the current viewport.
Metadata
isOpen()
→ bool
viewerType()
→ hou.viewerType enum value
Methods from hou.Pane
tabOfType(type, index=0)
→ hou.PaneTab or None
Find and return a pane tab with the desired type, or None
if no such tab
exists in the pane.
If there are multiple tabs in the pane with the desired type, then the
first found tab is returned. Use index
to return the other tabs. For
example, use index=0
to return the first found tab, use index=1
to
return the second found tab, etc.
See also hou.ui.paneTabOfType().
currentTab()
→ hou.PaneTab
Return the currently focused pane tab.
See also hou.PaneTab.setIsCurrentTab().
createTab(type)
→ hou.PaneTab
Create a new pane tab with the desired type and return it. The new pane tab will be current (i.e. it will be the pane tab that’s open).
splitHorizontally()
→ hou.Pane
Split the pane, adding a new pane to the right, and return the new pane. The new pane will have a single tab whose type is the same as the type of this pane’s current tab.
See also hou.Pane.splitVertically().
splitVertically()
→ hou.Pane
Split the pane, adding a new pane to the bottom, and return the new pane. The new pane will have a single tab whose type is the same as the type of this pane’s current tab.
See also hou.Pane.splitHorizontally().
desktop()
→ hou.Desktop or None
Return the desktop in which this pane exists, or None
if it is in
a floating panel that’s not attached to the desktop.
isMaximized()
→ bool
Return True
if this pane is maximized.
setIsMaximized(on)
Set the maximized state of this pane.
showsPaneBar()
showPaneBar(on)
sendKey(hotkey_name)
swapWithPane(pane)
getSplitParent()
→ hou.Pane or None
Return the parent split pane if the Pane is nested under a split.
getSplitChild(self,index)
→ hou.Pane or None
Return the split child Pane at index if the Pane is a split.
splitSwap()
Swap the left and right panes of an horizontal split Pane. Swap the top and bottom panes of a vertical split Pane.
splitRotate()
Turn an horizontal split Pane into a vertical split Pane.
isSplitMinimized()
→ bool
Return the true if the Pane is minimized on the split. A split can’t be minimized and maximized at the same time. In its default state, a split is not minimized and not maximized.
isSplitMaximized()
→ bool
Return the true if the Pane is maximized on the split. A split can’t be minimized and maximized at the same time. In its default state, a split is not minimized and not maximized.
setIsSplitMaximized(on)
→ bool
Set the maximized state of a split.
isSplit()
→ bool
Return True if the pane is a split.
setSplitFraction(self,fraction)
Set the split fraction of the parent split.
getSplitFraction(self,fraction)
→ double
Return the split fraction of the parent split.
setSplitDirection(self,dir)
Set the split direction of the parent split.
getSplitDirection(self,dir)
→ double
Return the split direction of the parent split.
Methods from hou.PathBasedPaneTab
addBookmark(path)
bookmarks()
cd(path)
currentNode()
→ Node
followsParent()
pwd()
→ Node
removeBookmarks(path_pattern)
setCurrentNode(node, pick_node = True)
setFollowParent(on)
setPwd(node)
showNetworkControls(on)
showsNetworkControls()
Replaces |