Functions ¶
addEventCallback(callback)
Register a Python callback to be called whenever a playbar event occurs (i.e. frame change, playback stopped).
callback
Any callable Python object that expects two arguments. The first argument is a hou.playbarEvent enum value and the second argument is a float storing the frame number of when the event took place.
def outputPlaybarEvent(event_type, frame): print "Playbar event", event_type, "at frame", frame hou.playbar.addEventCallback(outputPlaybarEvent)
areKeysShown()
→ bool
Return True if the display of keyframes in the playbar is turned on. Return False otherwise.
areTicksShown()
→ bool
Return True if the display of frame ticks in the playbar is turned on. Return False otherwise.
clearEventCallbacks()
Remove all Python callbacks that have been registered with hou.playbar.addEventCallback.
eventCallbacks()
→ tuple
of callback
Return a tuple of all the Python callbacks that have been registered with hou.playbar.addEventCallback.
frameBookmark(bookmark)
Frames the given bookmark by setting the playback range to the start and end time of that bookmark.
frameIncrement()
→ float
Return the frame increment step size.
frameRange()
→ hou.Vector2
Return a 2-tuple containing the start and end frame of the global time range.
isAudioShown()
→ bool
Return True if the display of audio in the playbar is turned on. Return False otherwise.
isRangeSliderShown()
→ bool
Return True if the display of the range slider in the playbar is turned on. Return False otherwise.
isPlaying()
→ bool
Return True if the playbar is playing. Return False otherwise.
isRangeRestricted()
→ bool
Return true if playback is restricted to within the playbar’s start frame and end frame.
isRealTime()
→ bool
Return True if realtime playback is turned on. Return False otherwise.
isRealTimeSkipping()
→ bool
Return True if realtime playback skipping is turned on. Return False otherwise.
jumpToNextKeyframe()
Sets the frame to the time of the next scoped keyframe.
Raises hou.NotAvailable if the playbar is not available.
jumpToPreviousKeyframe()
Sets the frame to the time of the previous scoped keyframe.
Raises hou.NotAvailable if the playbar is not available.
moveToBottom()
Move the playbar to the bottom of the desktop.
Raises hou.NotAvailable if the user interface is not available.
moveToPane(pane)
Move the playbar to the bottom of the specified pane.
Raises hou.ObjectWasDeleted if pane
does not point to a valid pane.
Raises hou.NotAvailable if the user interface is not available.
play()
Play in the forward direction.
Raises hou.NotAvailable if the playbar is not available.
playbackRange()
→ hou.Vector2
Return a 2-tuple containing the start and end frame of the playback range.
playMode()
→ hou.playMode
Return the playbar’s play mode.
Raises hou.NotAvailable if the playbar is not available.
realTimeFactor()
→ float
Return the multiplier factor used when playing with realtime playback turned on.
removeEventCallback(callback)
Remove a Python callback that was previously registered with hou.playbar.addEventCallback. See hou.playbar.addEventCallback for more information.
Raises hou.OperationFailed if the callback was not previously registered.
reverse()
Play in the reverse direction.
Raises hou.NotAvailable if the playbar is not available.
selectedKeyframes()
→ dictionary of (/hom/hou/hou.Parm.html, tuple of hou.BaseKeyframe) pairs
Returns a dictionary of (hou.Parm, keyframes) which are currently selected in the playbar. TIP: Here is an example of how to scale the selected key values by 2:
keyframes = hou.playbar.selectedKeyframes() for parm in keyframes.keys(): for key in keyframes[parm]: key.setValue(2 * key.value()) parm.setKeyframe(key)
selectionRange()
→ hou.Vector2 or None
This function exists for backwards compatibility.
Returns a 2-tuple containing the start and end frame of the selection range. If there are multiple selections, the returned 2-tuple contains the start and end frame of the selection that occurs first on the playbar. If there is no selection, then None is returned.
selectionRanges()
→ tuple of hou.Vector2
Returns a list of 2-tuples containing the start and end frame of each selection range.
setFrameIncrement(increment)
Set the frame increment step size. This value is ignored when playing with realtime playback turned on.
Raises hou.NotAvailable if the playbar is not available.
setFrameRange(start, end)
Set the global time range using frame numbers.
setPlaybackRange(start, end)
Set the playback range.
Raises hou.NotAvailable if the playbar is not available.
setPlayMode(mode)
Set the play mode to one of the following:
- hou.playMode.Loop - Loop to the start of the range when the playback slider reaches the end of the range.
- hou.playMode.Once - Stop playback when the slider reaches the end of the range.
- hou.playMode.Zigzag - Play in the forward direction until reaching the end of the playback range, then play in the reverse direction.
Raises hou.NotAvailable if the playbar is not available.
setRealTime(on)
Turn realtime playback either on or off.
Raises hou.NotAvailable if the playbar is not available.
setRealTimeFactor(factor)
Set the realtime playback multiplier. A multiplier value of less than 1 slows down the playback. A multiplier value of greater than 1 speeds up the playback. A multiplier value equal to 1 maintains realtime playback. The multiplier has no effect if realtime playback is turned off.
Raises hou.NotAvailable if the playbar is not available.
setRealTimeSkipping(on)
Turn realtime playback skipping either on or off.
Raises hou.NotAvailable if the playbar is not available.
setRestrictRange(on)
Turn restriction on the playback range on or off. When the restriction is turned on, playback will remain with the start and end frames of the playback range.
Raises hou.NotAvailable if the playbar is not available.
setTimeRange(start, end)
Set the global time range using time in seconds.
setUseIntegerFrames(on)
Turn integer frame values on or off.
Raises hou.NotAvailable if the playbar is not available.
showAudio(on)
Turn display of audio on the playbar on or off.
Raises hou.NotAvailable if the playbar is not available.
showKeys(on)
Turn display of keyframes on the playbar on or off.
Raises hou.NotAvailable if the playbar is not available.
showRangeSlider(on)
Turn display of the range slider on the playbar on or off.
Raises hou.NotAvailable if the playbar is not available.
showTicks(on)
Turn display of the frame ticks on the playbar on or off.
Raises hou.NotAvailable if the playbar is not available.
timelineRange()
→ hou.Vector2
Return a 2-tuple containing the start and end frames of the global frame range.
timeRange()
→ hou.Vector2
Return a 2-tuple containing the start and end times of the global time range.
usesIntegerFrames()
→ bool
Return True if playback uses integer frame values. Return False otherwise.
channelList()
→ hou.ChannelList
Return a copy of the current channel list.
setChannelList([Hom:hou.ChannelList])
Set the current channel list.
channelListFromSelection()
→ hou.ChannelList
Return a channel list from the selected nodes. This relies on the auto-add to channel list flags.
channelListFromNodes(self,nodes)
→ hou.ChannelList
Return a channel list from the a list of nodes. This relies on the auto-add to channel list flags.
channelListFromParmTuples(self,parms)
→ hou.ChannelList
Return a channel list from the a list of parameter tuples. This relies on the auto-add to channel list flags.
channelListFromParms(self,parms)
→ hou.ChannelList
Return a channel list from the a list of parameters. This relies on the auto-add to channel list flags.
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 the playbar’s Animation Toolbar.