| Inheritance |
|
Methods ¶
graph()
→ hou.ChannelGraph
Return the channel graph for this pane.
channelListSplitFraction()
→ double
Return the width of the embedded channel list as fraction (0-1 value) of the pane’s width.
setChannelListSplitFraction(value)
Set the width of the embedded channel list as fraction (0-1 value) of the pane’s width.
displayFilter()
→ string
Return the filter pattern for which channels are displayed.
setDisplayFilter(filter)
Set the filter pattern for which channels are displayed. The channel name is used to match against the pattern.
editorMode()
→ hou.channelEditorMode
enum value
Return the animation editor mode.
setEditorMode(mode)
Set the animation editor mode.
templateFilter()
→ string
Return the filter pattern for which channels are templated.
setTemplateFilter(filter)
Set the filter pattern for which channels are templated. The channel name is used to match against the pattern.
colorsCallback()
→ string
Return the active channel colors callback name.
setColorsCallback(callback_name)
→ bool
Set the active channel colors callback name. If the callback name is invalid, the active callback will be reset to default. Return True if the callback was successfully changed. Return False if the callback name was invalid.
registerColorsCallback(callback_name, callback_object )
→ bool
Registers a callback to generate custom channel colors based on the node and parameter names.
callback_name
A name for the custom color scheme.
You can use this to remove the callback with the unregisterColorsCallback method.
callback_object
A Python object with a getChannelColor method. For example:
class MyChannelColors(object): def getChannelColor(self, node_path, channel_name): return 0, 0, 0
The node argument is the path to the node (for example, /obj/table).
The parm argument is the internal name of the channel (for example, tx).
The method must return a 3-tuple representing normalized (0-1, not 0-255) red, green, and blue values.
If the method returns (0, 0, 0) Houdini uses the default channel color.
You should register the callback in a session-independent startup script.
When you register the callback, Houdini will call it once with empty string arguments to make sure it returns a triple. Your getChannelColor() method needs to handle this case.
The following example object uses the custom color tint of a node to color its channels:
import hou class NodeColors: ''' Use hue variants of a node's color for parameter names ending in x, y or z. ''' def getChannelColor(self, node_path, channel_name): # Handle the empty string case if not node_path: return 0, 0, 0 # Get a Node object from the path n = hou.node(node_path) # Get the node's color as a hou.Color object color = n.color() # Get the color's HSV values as a triple hue, sat, val = n.color().hsv() # If the color is gray, use the default if not sat: return 0, 0, 0 # Hue-shift the node color for X, Y, and Z channels: if channel_name.endswith("x"): color.setHSV(hue - 50, sat * 2, val * 1.2) elif channel_name.endswith("y"): color.setHSV(hue, sat * 2, val * 1.2) elif channel_name.endswith("z"): color.setHSV(hue + 50, sat * 2, val * 1.2) # Return the color as normalized (r, g, b) return color.rgb()
unregisterColorsCallback(callback_name)
→ bool
Unregister a callback by name. It also resets the active callback if the callback to remove was the active one. Return True if the callback was successfully removed. Return False if the callback name was invalid.
colorsCallbacks()
→ tuple
of string
Return the list of registered channel colors callback.
channelList()
→ hou.ChannelList
Return a copy of the current channel list.
setChannelList([Hom:hou.ChannelList])
Set the current channel list.
channelListPinned()
→ bool
Return True if the Channel List is pinned in its Animation Editor.
setChannelListPinned(on)
Pin or Unpin the channel list in its Animation Editor.
isAnimBarShown()
→ bool
Return whether or not the Animation Toolbar is currently displayed.
showAnimBar(show: bool)
Shows or hides the Animation Toolbar.
animBar()
: → hou.AnimBar
Return a hou.AnimBar, which provides control over this Channel Editor’s Animation Toolbar.
Methods from hou.PaneTab ¶
name()
→ str
Return the name of this tab.
setName(name)
Set the name of this pane tab. A pane tab name may contain spaces.
Note that this name is the internal name of the tab, and is different from the label displayed in the interface.
type()
→ hou.paneTabType enum value
Return the type of this tab (i.e. whether it is a scene viewer, parameter editor, network editor, etc.).
setType(type)
→ hou.PaneTab
Create a new pane tab of the given type, replace this tab with it, and return the new pane tab. Use the returned pane tab afterward; references to this tab become invalid.
close()
Close the pane tab.
pane()
→ hou.Pane or None
Return the pane in the desktop that contains this pane tab. Note that pane tabs in regular floating panels are always in a pane, since regular floating panels contain one or more panes.
However, some floating panels have their content stripped down to only contain one particular pane tab type, and do not display the user interface to add more pane tabs, split the pane, etc. This method returns None for these stripped down floating panels.
floatingPanel()
→ hou.FloatingPanel or None
Return the floating panel that contains this pane tab or None if the pane tab is not in a floating panel.
isCurrentTab()
→ bool
Return whether this tab is the selected tab in the containing pane.
setIsCurrentTab()
Set this tab as the selected tab in the containing pane.
isFloating()
→ bool
Return whether this pane tab is in a floating panel.
This method can be approximately implemented as follows:
def isFloating(self): return self.pane() is None or self.pane().floatingPanel() is not None
clone()
→ hou.PaneTab
Create a floating copy of the pane tab and return the cloned pane tab. The new pane tab is in a new floating panel.
linkGroup()
→ hou.paneLinkType enum value
Return the link group that this pane tab belongs to.
See also hou.PaneTab.isPin.
setLinkGroup(group)
Set the link group membership of this pane tab.
isPin()
→ bool
Return whether this pane tab is pinned. This method is equivalent to
(self.linkGroup() == hou.paneLinkType.Pinned)
See also hou.PaneTab.linkGroup.
setPin(pin)
If pin is True, set the link group membership to hou.paneLinkType.Pinned.
Otherwise, set it to hou.paneLinkType.FollowSelection. This method can be
implemented using hou.PaneTab.setLinkGroup as follows:
def setPin(self, pin): if pin: self.setLinkGroup(hou.paneLinkType.Pinned) else: self.setLinkGroup(hou.paneLinkType.FollowSelection)
See also hou.PaneTab.setLinkGroup.
size()
→ tuple
of int
Return a 2-tuple containing the pane tab’s width and height.
The width and height include the content area, network navigation control area (if any) and borders.
The width and height do not include the pane tab’s tab area.
contentSize()
→ tuple
of int
Return a 2-tuple containing the pane tab’s content area width and height.
The width and height do not include the network navigation control area (if any), pane tab borders or tab area.
hasNetworkControls()
→ bool
Return True if this pane tab type supports network controls.
isShowingNetworkControls()
→ bool
Return whether this pane tab is showing its network control bar. Return False if the pane tab doesn’t have network controls. See also hou.PaneTab.hasNetworkControls.
setShowNetworkControls(pin)
Show or Hide the network control bar. Has no effect if the pane tab doesn’t have network controls. See also hou.PaneTab.hasNetworkControls.
This method is deprecated in favor of showNetworkControls.
showNetworkControls(pin)
Show or Hide the network control bar. Has no effect if the pane tab doesn’t have network controls. See also hou.PaneTab.hasNetworkControls.
displayRadialMenu(menu)
Launch the specified radial menu in the pane tab.
qtParentWindow()
→ QWidget
Return a PySide6.QtWidgets.QWidget instance that represents the window
containing the pane tab.
qtScreenGeometry()
→ QRect
Return the geometry of the pane as a PySide6.QtCore.QRect
object. The x and y properties of the returned QRect object
point to the top-left corner of the pane in screen coordinates.