Inheritence |
|
Methods
Bounds and Transformations
cursorPosition(confine_to_view=True)
→ hou.Vector2
Return the current mouse cursor position expressed in network view
coordinates. If confine_to_view
is True
, the returned value
will be clipped to the area of the network currently visible in the
network editor.
Here is an example of moving a node underneath the mouse cursor:
# Get the network editor. net_editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) # Get the node. node = hou.node("/obj/myNode") # Set the node's new position. node.setPosition(net_editor.cursorPosition())
isShowingConnectors()
→ bool
Return True if the network editor zoom level is high enough that input and output connectors are visible. This can be useful in network editor event handlers that expect the user to click on a connector. If the connectors are not visible, some alternative interaction is required.
isPosInside(pos)
→ bool
Return True if the hou.Vector2 passed as the pos
parameter is
inside the network view. The values in pos
are mouse coordinates
expressed relative to the network editor pane.
setCursorPosition(pos)
Moves the mouse cursor to the position specified by the hou.Vector2
pos
parameter.
screenBounds()
→ hou.BoundingRect
Return the screen space bounds of the network editor viewing area. This
does not include the menu bar, toolbar, or other UI elements. Only the area
where the network contents are displayed is returned. The bounds are
relative to the network area itself, so the lower left corner of the
returned bounding box will always be (0, 0)
.
visibleBounds()
→ hou.BoundingRect
Return the network space bounds of the network editor viewing area.
setVisibleBounds(bounds, transition_time=0.0, max_scale=0.0, set_center_when_scale_rejected=False)
Sets the visible bounds of the network editor viewing area, expressed in
network space coordinates. This method will never alter the screen space
size or location of the network editor. If the area specified by the
bounds
parameter has a different aspect ratio from the actual network
editor, this method will automatically adjust the bounds to ensure that
the area specified is fully visible.
bounds
A hou.BoundingRect specifying the area that should be visible in the network editor.
transition_time
The amount of time, in seconds, over which the network editor will animate the transition from the current visible bounds to the new visible bounds.
max_scale
If set to a non-zero value, this parameter controls the maximum zoom level that will be allowed. The default maximum scale used by the network editor code is 100.
set_centered_when_scale_rejected
If set to True
, but the new zoom level is determined to be the same
as the previous zoom, no change is made to the bounds at all. This
prevents a bounds change, that was intended as a pure zoom, from
inadvertently panning the view if the zoom doesn’t actually change.
setLocatingEnabled(enabled)
Enables or disables highlighting of UI elementes under the mouse in the network editor. When disabled, mouse events sent to the network editor event processing code will never specify a located or selected UI element. In some modes (such as when in a viewing state where mouse events only modify the view) it is desirable to disable this behavior.
locatingEnabled()
→ bool
Return True if the network editor will highlight UI elementes under the mouse, and allow clicking on those UI elements.
lengthToScreen(len)
→ float
Given a length value len
, expressed in network units, return the
equivalent length in screen units (pixels). The result will depend on the
current zoom level of the network editor.
lengthFromScreen(len)
→ float
Given a length value len
, expressed in screen units (pixels), return the
equivalent length in network units. The result will depend on the
current zoom level of the network editor.
sizeToScreen(size)
→ hou.Vector2
Given a box size value size
as a hou.Vector2, expressed in network
units, return the equivalent size in screen units (pixels). This is
equivalent to making two separate calls to lengthToScreen()
for the
width and height. The result will depend on the current zoom level of the
network editor.
sizeFromScreen(size)
→ hou.Vector2
Given a box size value size
as a hou.Vector2, expressed in screen
units (pixels), return the equivalent size in network units. This is
equivalent to making two separate calls to lengthFromScreen()
for the
width and height. The result will depend on the current zoom level of the
network editor.
posToScreen(pos)
→ hou.Vector2
Given a position value pos
as a hou.Vector2, expressed in network
units, return the equivalent position in screen units (pixels). The result
will depend on both the current zoom level and view position of the
network editor.
posFromScreen(pos)
→ hou.Vector2
Given a position value pos
as a hou.Vector2, expressed in screen
units (pixels), return the equivalent position in network units. The result
will depend on both the current zoom level and view position of the
network editor.
overviewPosToScreen(pos)
→ hou.Vector2
Given a position value pos
as a hou.Vector2, expressed in network
units, return the equivalent position in screen units (pixels) within the
overview gadget in the network editor. This method returns a value that
assumes the overview area is visible, even if it is not.
overviewPosFromScreen(pos)
→ hou.Vector2
Given a position value pos
as a hou.Vector2, expressed in screen
units (pixels) within the overview gadget, return the equivalent position
in network units. This method returns a value that assumes the overview
area is visible, even if it is not. If the provided position is outside
the overview area, this method returns a value that assumes the overview
gadget extends as far as required to reach the specified coordinates.
overviewVisible()
→ bool
Return a boolean indicating whether or not the overview gadget is currently visible. This result reflects the true state of the overview gadget even if the overview is configured to display automatically.
overviewVisibleIfAutomatic()
→ bool
Return a boolean indicating whether or not the overview gadget would
currently be visible if it was configured to display automatically. In
other words, this method returns True
if any part of the network is
currently outside the visible bounds of the editor.
Selection and Highlighting
networkItemsInBox(pos1, pos2, for_drop=False, for_select=False)
→ tuple
of (hou.NetworkItem, str
, int
)
Return any network items inside the bounding box defined by the
hou.Vector2 points pos1
and pos2
. These points are specified in
screen space, which makes it easy to call this function given a mouse
position.
The returned tuple of triples are sorted in increasing distance from the
center of the specified bounding box. Each triple consists of a network
item (which may be a node, sticky note, wire, etc.), a string which
describes the part of the UI for that item that was found in the box, and
an optional index value which differentiates between different instances
of the same item/name combination. For example, if the connector for input
2 of the node geo1
was the only thing inside the provided box, the
return value would be:
>>> editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) >>> editor.networkItemsInBox(pos1, pos2) ((<hou.ObjNode of type subnet at /obj/subnet1>, 'input', 2),)
One of for_drop
or for_select
may be set to True
to use a different
criteria for deciding what a valid target is. By default, any UI widget
that highlights with the mouse over it will be returned by this method.
Setting for_drop
to True
will return only UI widgets that can be drop
targets. Setting for_select
to True
will only return UI widgets that
result in the item being selected when box picking.
setDragSourceData(items)
Controls the network items that are put into the drag and drop buffer. The values in this buffer are only used when dragging items out of the network editor (such as when the user drags a node from the network editor onto a textport, or a parameter dialog.
setDropTargetItem(item, name, index)
When the user is performing a drag and drop operation within the network
editor, it is important that they receive some feedback about where the
thing they are dragging will be dropped if they let go of the mouse
button. This indication is provided by highlighting the drop target in the
UI. This method allows the current drop target to be specified in python
code. Usually the item
, name
, and index
will be values returned in
one of the tuples from the networkItemsInBox
method.
dropTargetItem()
→ (hou.NetworkItem, str
, int
)
Return the currently set drop target item information. These are just the
values passed into the last call to setDropTargetItem
.
setDecoratedItem(item, interactive)
This method is similar to setDropTargetItem
in that it tells the
network editor to highlight a particular item when drawing it. In the case
of the decorated item, however, only the network item needs to be provided.
The result of setting a node as the decorated item is to bring up the node
ring. Network dots may also be the decorated item, in which case the input
and output connectors for the dot are shown. The interactive
boolean flag
indicates whether the user is allowed to interact with the decorations. If
not, the node ring is drawn faded, and its buttons cannot be clicked. This
non-interactive mode corresponds to having the Control key pressed while
moving the mouse around the network editor.
decoratedItem()
→ hou.NetworkItem
Return the currently set decorated item. This is just the item
value passed into the last call to setDecoratedItem
.
decorationInteractive()
→ bool
Return whether the currently decorated item is interactive. This is just
the interactive
value passed into the last call to setDecoratedItem
.
setPreSelectedItems(items)
When box selecting items in the network, it is useful to be able to see what will be selected if the mouse button is released. These items are drawn to the overlay layer of the network editor canvas in a light blue color with transparency. The network items passed as a tuple to this method are the ones that get drawn with this pre-selection highlight.
preSelectedItems()
→ tuple of hou.NetworkItem
Return the currently pre-selected items. These are just the
values passed into the last call to setPreSelectedItems
.
setNetworkBoxPendingRemovals(items)
When moving items around the network, network boxes automatically resize to contain their child items as they move. To indicate that items will be removed from their network box, pass them as a tuple to this method. Doing so will cause their network box containers to not resize to fit the items as they move.
networkBoxPendingRemovals()
→ tuple of hou.NetworkMovableItem
Return the items currently pending remove from their network box. These
are just the values passed into the last call to
setNetworkBoxPendingRemovals
.
Decoration
nodeShapes()
→ tuple of str
Return a list of all valid node shape names. These are the values that can be set into the user data of a node to control the shape of a specific node. They are also the shape names that can be used as defaults for node types.
This code sets a node to a random shape:
>>> import random >>> editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) >>> shapes = editor.nodeShapes() >>> hou.node('/obj/geo1').setUserData('nodeshape', random.choice(shapes))
reloadNodeShapes()
→ tuple of str
Forces all node shape files to be reloaded. This may cause new shapes to
become available, or existing shapes to be removed. Returns a tuple of
strings that indicate the name of each loaded node shape, and any error
messages generated while parsing each shape. Use nodeShapes()
to get a
simple list of all successfully loaded shapes after calling this method.
setFootprints(footprints)
Configure the footprint rings that the network editor should display.
The footprints
parameter must be a tuple of hou.NetworkFootprint
objects. See that class for more information.
footprints()
→ tuple
of hou.NetworkFootprint
Return the current footprint configuration as a tuple of
hou.NetworkFootprint objects. These are just the values passed into
the last call to setFootprints
.
setCursorMap(cursors)
Tells the network editor which mouse cursor to use based on what UI widget
is under the mouse. This configuration is specified as a dictionary
mapping a tuple to a string. The string is the name of the cursor, which
can be any of the cursor file names from the $HFS/houdini/config/Cursors
directory. Each tuple consists of a string and an integer. The string is
the name of the UI widget, and the integer represents the specific index
value within that UI widget.
The following code sets the network editor to show a "connect" cursor for all node inputs and outputs:
>>> editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) >>> editor.setCursorMap({ ... ('input', -1): 'wire', ... ('output', -1): 'wire' ... })
The following code sets the network editor to show an appropriate resize icon based on the specific section of the sticky note border under the mouse:
>>> editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) >>> editor.setCursorMap({ ... ('stickynoteborder', 0): 'arrowSWNE', ... ('stickynoteborder', 1): 'arrowLeftRight', ... ('stickynoteborder', 2): 'arrowNWSE', ... ('stickynoteborder', 3): 'arrowUpDown', ... ('stickynoteborder', 4): 'arrowSWNE', ... ('stickynoteborder', 5): 'arrowLeftRight', ... ('stickynoteborder', 6): 'arrowNWSE', ... ('stickynoteborder', 7): 'arrowUpDown' ... })
cursorMap()
→ dict
of (str
, int
) to str
Return the current mouse cursor configuration. This will just be the
dictionary passed into the last call to setCursorMap
.
setDefaultCursor(cursor_name)
Tells the network editor which mouse cursor to use when none of the UI
mentioned in the dictionary sent to setCursorMap()
is under the mouse.
defaultCursor()
→ str
Return the default mouse cursor set by the last call to
setDefaultCursor()
.
setBackgroundImages(images)
Configures the background images to be displayed in the network editor. The network editor saves and loads the image descriptions into the user data for each network, which allows a different set of background images for each network. The images are specified as a tuple of hou.NetworkImage objects. See the documentation of that class for more information.
backgroundImages()
→ tuple
of hou.NetworkImage
Return the descriptors for the current set of background images being
displayed in the network editor. This will be the tuple passed into the
last call to setBackgroundImages
.
setAdjustments(items, adjustments, auto_remove=False)
Configures temporary adjustments to the sizes and locations of network
items in the editor. The items
parameter is a tuple of
hou.NetworkMovableItem objects. The adjustments
parameter is a
tuple of hou.NetworkAnimValue objects to associate with each
network item in the items
tuple. See the documentation of that class
for more information about specifying adjustments.
The auto_remove
parameter may be set to True
to indicate that the
network editor should automatically delete the adjustments once the
animation on them has completed. This is useful for animations performed
at the end of a user action, where the following events do not relate to
the changes being made, and so it is easier not to have to manage the
reset of the adjustment values explicitly in the future.
setShapes(shapes)
The shapes
parameter specifies a tuple of hou.NetworkShape objects
which will be drawn into the network editor. See documentation of the
network shape class and its subclasses for more information.
setOverlayShapes(shapes)
The shapes
parameter specifies a tuple of hou.NetworkShape objects
which will be drawn into the overlay layer of the network editor canvas.
See documentation of the network shape class and its subclasses for more
information.
redraw()
Forces the network editor to redraw. This may be necessary in cases where your code updates aspects of your Houdini session which indirectly affect the drawing of the network editor (such as changing default node shapes and colors). Direct changes to the network (such as changing the shape or color of a specific node) should automatically cause the network editor to redraw. Only use this function when you see that a redraw is not being triggered automatically by the your code.
Network Item Information
itemRect(item, adjusted=True)
→ hou.BoundingRect
Return the bounding rectangle of the hou.NetworkMovableItem
specified by the item
parameter. If the adjusted
parameter is set to
True
, any adjustments to this item’s size and position set in the most
recent call to setAdjustments()
will be taken into account. If False
,
these adjustments will be ignored. Note that for nodes, only the node
body is taken into account, not the node name, badges, or other
decorations.
itemInputPos(item, input_index, adjusted=True)
→ hou.Vector2
Return the center point of the input connector of the
hou.Node or hou.NetworkDot specified by item
. The
input_index
parameter specifies the specific input of interest. For
network dots, this value must be zero. If the adjusted
parameter is set
to True
, any adjustments to this item’s size and position set in the
most recent call to setAdjustments()
will be taken into account.
If False
, these adjustments will be ignored.
itemInputDir(item, input_index)
→ hou.Vector2
Return a normalized vector indicating the direction at which the wire
connected to the specified input should emerge from its connector. The
item
parameter may be a hou.Node or hou.NetworkDot. The
input_index
specifies which input is of interest. This value must be
zero if the item is a network dot.
itemOutputPos(item, output_index, adjusted=True)
→ hou.Vector2
Return the center point of the output connector of the
hou.Node, hou.NetworkDot, or hou.SubnetIndirectInput
specified by item
. The output_index
parameter specifies the specific
output of interest. For network dots and subnet indirect inputs, this value
must be zero. If the adjusted
parameter is set to True
, any
adjustments to this item’s size and position set in the most recent call to
setAdjustments()
will be taken into account. If False
, these
adjustments will be ignored.
itemOutputDir(item, output_index)
→ hou.Vector2
Return a normalized vector indicating the direction at which the wire
connected to the specified output should emerge from its connector. The
item
parameter may be a hou.Node, hou.NetworkDot, or
hou.SubnetIndirectInput. The output_index
specifies which output
is of interest. This value must be zero if the item is a network dot or
subnet indirect input.
allVisibleRects(ignore_items)
→ tuple
of (hou.NetworkMovableItem, hou.BoundingRect)
This method is equivalent to calling itemRect()
for every network item
that is currently visible in the network editor. Getting these results in
a single method call is significantly faster, and eliminates the need to
test each item for visibility. This method is used for finding items to
snap against when moving nodes. The ignore_items
parameter is a tuple
of hou.NetworkMovableItem objects that should not be returned in
the result tuple.
Prompts
setTooltip(tooltip)
Sets the tooltip string that should be shown under the mouse if it remains
stationary for a short time. This string should generally be set to
correspond to the network item currently under the mouse cursor. Because
it appears after a delay, it is okay to make this text more verbose than
the prompt text passed to setPromptText()
.
tooltip()
→ str
Return the current tooltip string. This is the value that was last passed
to the setTooltip()
method.
setPrompt(prompt)
Sets the prompt text that appears at the bottom of the network editor.
This string should generally be set to correspond to the network item
currently under the mouse cursor. This text should be fairly brief.
More detailed information can be put into the tooltip through the
setTooltip()
method.
prompt()
→ str
Return the current prompt string. This is the value that was last passed
to the setPromptText()
method.
flashMessage(image, message, duration)
Causes a message to appear briefly in the upper left corner of the network
editor, then fade away. The image
parameter specifies an icon or image
file that should be displayed along with the text specified in the
message
parameter. Either of these parameters may be None
if only
an image or only text is desired. The duration
parameter specifies the
time in seconds before the message should fade away.
Standard Menus and Editors
Event Handling
scheduleTimerEvent(seconds)
→ int
Requests that a timer event be sent to the network editor after seconds
has elapsed. The returned integer id is included in the triggered event
to differentiate between timers if more than one is scheduled at a time.
handleCurrentKeyboardEvent(resend=False)
Requests that the network editor handle the current keyboard event. This method only makes sense when handling a keyboard event.
If the resend
parameter is set to True
, the keyboard event is sent to
the network editor’s python handling code a second time rather than the
network editor handling the keyboard event itself. This is useful if the
network editor is in a state or mode that does not know how to handle a
key, but which the state recognizes as one that should exit the current
state, and possibly trigger some other python event handling code. This
parameter is used in the state for selecting the position of a new node if
the Tab key is pressed (which exits the positions selection state, and
triggers a new Tab menu instead).
If this method is not called when handling a keyboard event, the network editor assumes that the python event handling code has handled the keyboard event.
setVolatileKeys(keys)
The keys
parameter specifies a tuple of keyboard keys that should be
processed as volatile keys. This means they generate a "keydown"
event
when the key is pressed, and a "keyup"
event when the key is released.
All other keys simply send a "keyhit"
event after the key is released,
with no notification when the key is first pressed. The key strings are
of the form returned by the hou.ui.hotkeys() method, which is a
combination of the symbol on the key, and any modifier keys involved,
such as "Ctrl+Shift+G"
.
isVolatileKeyDown(key)
→ bool
Return True
if the specified keyboard key is currently pressed. This
allows the current state of a volatile key to be tested without seeing
the "keydown"
event triggered when the user pressed the key. Calling
this method with a key that has not been registered through the
setVolatileKeys
method will always return False
even if the key
is currently pressed. The key string is of the form returned by the
hou.ui.hotkeys() method, which is a combination of the symbol on the
key, and any modifier keys involved, such as "Ctrl+Shift+G"
.
pushEventContext(module, data)
Causes all future events generated in the network editor to be passed to
the python module specified by module
(which is import
ed by the event
handling code). The data
parameter should be a python dict
which can
contain any additional information required by the module. It can also
be populated to return values from the module to the code that calls
this method.
This method does not return until the pushed module calls hou.NetworkEditor.popEventContext(), so it is very important that the provided module always provide some means of exiting the module with a call to that method.
This method name starts with the word "push" to indicate that there can be a stack of event contexts, not just a single alternate context.
popEventContext()
Pops an event context off the stack, returning control to the python code which most recently called hou.NetworkEditor.pushEventContext().
eventContextData()
→ dict
Accesses the context data passed into the most recent call to the
hou.NetworkEditor.pushEventContext() method. If no calls have been
made to this method, there is still a python dict
available to store
any global information that may be used by the network editor event
handling code. As an example, the current view bounds for each network
visited by the editor are stored as part of this context data dictionary.
Preferences
setPref(pref, value)
Sets the preference named pref
to value
. The value is always a string,
and must be converted to or from a number, enum, or other format as
appropriate. If the preference specified by pref
is a global preference,
all network editors will automatically update with the new value.
Otherwise the change will only affect this network editor.
getPref(pref)
→ str
Return the value of the preference named pref
. This preference may be
a global or local preference. The returned value is always a string which
can be interpreted as a number or other data structure as appropriate for
the specific preference.
setPrefs(prefs)
Sets a number of preference values with a single method call. The prefs
parameter must be a python dictionary mapping preference name strings to
value strings. The preferences may be local or global, but this method is
most often used for saving and loading the local preferences for a single
network editor.
getPrefs()
→ dict
of str
to str
Return all global and local preferences for this network editor as a python dictionary mapping preference name strings to value strings.
registerPref(pref, value, global)
Registers a preference with the name pref
, and default value value
.
If global
is True
, this preference is treated as a global preference
that is applied to all network editors and saved in
$HOUDINI_USER_PREF_DIR/networkeditor.pref
. Otherwise the preference is
considered local to each network editor, and will be saved to the desk
file with each network editor instance.
Registering a preference is required to ensure the preference is saved when it is not a preference used internally by the network editor. The preference that enables snapping, or the one to enable dropping a node onto an existing wire are examples of preferences that are only used by the python event handling code, and so must be explicitly registered. This registration should be done in response to the network editor initialization event which is sent once to each network editor when it is first created.
badges()
→ tuple
of tuple
of str
Return descriptions of the optional node badges that can be shown in the network editor. Each tuple contained in the returned value contains three strings describing the badge. The first is the preference value that controls whether the badge is hidden, or appears as a small or large icon. The second string is a description of the badge. The third string is the name of the badge icon. These values can be used to present an interface for configuring the badges.
textBadges()
→ tuple
of tuple
of str
Return descriptions of the optional node text that can be shown in the network editor. Each tuple contained in the returned value contains three strings describing the text. The first is the preference value that controls whether the text is hidden, or appears as truncated or full text. The second string is a description of the text. The third string is the name of an icon that can be used to represent the meaning of the text. These values can be used to present an interface for configuring the text.
Deprecated
frameSelection()
Centers the nodes within the network editor to show the current selection and zooms to its extents. This method wraps a call to hou.NetworkEditor.setVisibleBounds().
homeToSelection()
Centers the nodes within the network editor to show the current selection. This method wraps a call to hou.NetworkEditor.setVisibleBounds().
listMode()
→ bool
Return True if the network editor is in list mode and False otherwise.
setListMode(on)
Set the network editor to enter list mode if on
is True and to exit list
mode if on
is False.
selectPosition(input_node=None, output_index=0, output_node=None,
input_index=0)
→ hou.Vector2
This method wraps a call to hou.NetworkEditor.pushEventContext(),
with the event context set to 'nodegraphselectpos'
, and appropriate
context data to give behavior similar to the old network editor.
Prompt the user to select a position in the network editor for a new node to be placed. The network editor visualizes the position with a dotted outline of a node placeholder. The user can then move the mouse to change the position and to confirm. The user can also press ⎋ Esc instead to cancel the selection.
You can optionally pass in hou.Node objects to the input_node
and
output_node
arguments to visualize the node placeholder with connections
to the specified input and output nodes.
Return a hou.Vector2 containing the x,y coordinates of the selected position.
Raise hou.OperationInterrupted if the user canceled the selection. Raise hou.OperationFailed if the network editor is in list mode.
This method can be useful for scripts that create new nodes and prompts for node positions. Here is an example:
# Get the input and output nodes that the new node will connect to. input_node = hou.node("/obj/myInput") output_node = hou.node("/obj/myOutput") # Set the new node to connect to the first output of the input node # and the second input of the output node. output_index = 0 input_index = 1 # Get the network editor. network_editor = hou.ui.curDesktop().paneTabOfType( hou.paneTabType.NetworkEditor) # Prompt the user to select a position for the new node. position = network_editor.selectPosition( input_node, output_index, output_node, input_index) # Create the new node. new_node = hou.node("/obj").createNode("geo") # Position the new node and wire it to the input and output nodes. new_node.move(position) new_node.setInput(0, input_node, output_index) output_node.setInput(input_index, new_node, 0)
autoAddToNetbox(node)
This method is deprecated in the new network editor and does nothing.
insertIntoUnderlyingConnections(node, x, y)
This method is deprecated in the new network editor and does nothing.
modifyPositionForNode(vector2, node)
→ Vector2
This method is deprecated in the new network editor, and simply returns the position passed into the function.
autoPlaceNodes()
→ bool
This method is deprecated in the new network editor and always
returns False
.
autoScrollNodes()
→ bool
This method is deprecated in the new network editor and always
returns False
.
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()