Functions ¶
newBookmark(name, start_frame, end_frame)
→ hou.Bookmark
Creates and returns a new hou.Bookmark object using the provided
options. You must use this function to create new bookmarks; you cannot
instantiate the Bookmark
class directly.
bookmarks()
→ tuple
of hou.Bookmarks
Returns a tuple of current hou.Bookmarks, sorted by start time.
getBookmark(session_id)
→ hou.Bookmark
Returns the hou.Bookmark with the matching session id, or returns None if there is no such bookmark.
saveBookmarks(filename, bookmarks=None)
→ bool
Saves a provided list of hou.Bookmark objects to the given json file. If the second argument is left empty, the list of current bookmarks will be saved instead. Returns True on success, or False otherwise.
loadBookmarks(filename)
→ bool
Loads the list of bookmarks from the given file, returning True on success or False otherwise. Note that any existing hou.Bookmark objects will be invalid.
clearBookmarks()
Clears out all bookmarks. Note that any existing hou.Bookmark objects will be invalid.
removeBookmarks(bookmarks)
Deletes the given bookmarks and removes them from the list of active bookmarks.
The bookmarks
parameter should be a list of hou.Bookmark objects.
addBookmarksChangedCallback(callback)
Registers a callback function to be executed whenever the current bookmarks are modified.
removeBookmarksChangedCallback(callback)
Removes an existing callback.
getGeometryChannels(collection_name, geometry, channel_names=None)
Writes geometry channels which were previously added to the channel list back into the provided geometry as channel primitives.
collection_name
Name of the collection from which to fetch the geometry channels.
geometry
Writeable geometry which the channel primitives will be written to.
channel_names
List of names of channels in the given collection to fetch. If not specified, all channels in the collection will be fetched.
See also:
setGeometryChannels(collection_name, geometry, channel_names)
Updates an existing scoped geometry channels collection with channels from the specified geometry. If channels with conflicting names already exist in the geometry, they will be overwritten.
collection_name
Name of the collection which the given channels will be added to.
geometry
Geometry from which to fetch the new channel primitives from.
channel_names
List of names of channels to add to the collection. If empty, all channels in the geometry will be added.
setGeometryChannelsFromPattern(collection_name, geometry, pattern)
Updates an existing scoped geometry channels collection with channels from the specified geometry. If channels with conflicting names already exist in the geometry, they will be overwritten.
collection_name
Name of the collection which the given channels will be added to.
geometry
Geometry from which to fetch the new channel primitives from.
pattern
Pattern string, of channel primitives to add to the collection.
setGeometryChannelPending(collection_name, channel_name, value)
Sets the value of the scoped geometry channel at the current frame and marks it as pending.
collection_name
Name of the collection which the channel belongs to.
channel_name
Name of the channel to modify.
value
Pending value to set at the current frame. If None, any pending keys for the channel will be cleared.
isGeometryChannelPending(collection_name, channel_name)
Returns whether or not a channel has a pending value.
collection_name
Name of the collection which the channel belongs to.
channel_name
Name of the channel.
isGeometryChannelPinned(collection_name, channel_name=None)
→ bool
Returns whether or not a geometry channel is pinned. If the second argument is left empty, returns whether or not all channels in the collection are pinned.
collection_name
Name of the collection which the channel belongs to.
channel_name
Name of the channel.
getPinnedGeometryChannels(collection_name)
Returns a list of all pinned geometry channels in the provided collection.
collection_name
Name of the collection.
addGeometryChannelsChangedCallback(collection_name, callback, on_mouse_up=True)
Registers a callback function to be executed whenever geometry channels in
the given collection are modified. The collection must have already been
added to the channel list with hou.playbar.setChannelList
.
collection_name
Name of the collection from which to listen for changes.
callback
Callback function, accepting two parameters, a tuple of the names of geometry channels that have been changed, and the collection name.
on_mouse_up
When modifying geometry channels in the Channel Editor, whether this callback should be triggered only on mouse up, or continuously as channels are modified. Defaults to True, for only on mouse up.
See also:
removeGeometryChannelsChangedCallback(collection_name, callback, on_mouse_up=True)
Removes an existing callback from the given geometry channels collection.
collection_name
Name of the collection from which to remove a callback.
callback
Callback function to remove.
on_mouse_up
Whether the callback to remove was registered for mouse up events or
not. Must match the same value passed in when originally registering
the callback with addGeometryChannelsChangedCallback
.
slopeMode()
→ hou.slopeMode
Returns the current slope mode for inserting new keys, auto or manual.
setSlopeMode(mode)
Set the default slope mode to one of the following:
-
hou.slopeMode.Manual
: Newly inserted keys will be set to manual slope mode. -
hou.slopeMode.Automatic
: Newly inserted keys will be set to automatic slope mode.