Methods ¶
clear()
Clears the channel list.
parms()
→ tuple
of hou.Parm
Returns a tuple of hou.Parm with all the channels in the channel list.
selected()
→ tuple
of hou.Parm
Returns a tuple of hou.Parm with all the channels selected in the channel list.
deselected()
→ tuple
of hou.Parm
Returns a tuple of hou.Parm with all the channels deselected in the channel list.
pinned()
→ tuple
of hou.Parm
Returns a tuple of hou.Parm with all the channels pinned in the channel list.
unpinned()
→ tuple
of hou.Parm
Returns a tuple of hou.Parm with all the channels unpinned in the channel list.
selectedValue()
→ tuple
of hou.Parm
Returns a tuple of hou.Parm with all the channels with their value column selected in the channel list.
deselectedValue()
→ tuple
of hou.Parm
Returns a tuple of hou.Parm with all the channels with their value column deselected in the channel list.
addParm(parm, selected, pinned, valueselected)
Adds a parameter to the channel list setting selected, pinned and value selected flags.
parm
A hou.Parm.
selected
Select the channel, True by default.
pinned
Pin the channel, False by default.
valueselected
Select the value column of the channel, False by default.
addParms(parms, selected, pinned, valueselected)
Adds a list of parameters to the channel list setting selected, pinned and value selected flags.
parms
A tuple
of hou.Parm.
selected
Select the channel, True by default.
pinned
Pin the channel, False by default.
valueselected
Select the value column of the channel, False by default.
addPath(path, selected, pinned, valueselected)
Adds a parameter to the channel list setting selected, pinned and value selected flags.
path
A full path string to a parameter.
selected
Select the channel, True by default.
pinned
Pin the channel, False by default.
valueselected
Select the value column of the channel, False by default.
addPaths(paths, selected, pinned, valueselected)
Adds a list of parameters using full paths to the channel list setting selected, pinned and value selected flags.
path
A full path string to a parameter.
selected
Select the channel, True by default.
pinned
Pin the channel, False by default.
valueselected
Select the value column of the channel, False by default.
remove(parm)
Remove a parameter or a list of parameters from the channel list.
select(parm)
Select a parameter or a list of parameters in the channel list.
deselect(parm)
Deselect a parameter or a list of parameters in the channel list.
pin(parm)
unpin(parm)
Unpin a parameter or a list of parameters in the channel list.
selectValue(parm)
Select the value column of a parameter or a list of parameters in the channel list.
deselectValue(parm)
Deselect the value column of a parameter or a list of parameters in the channel list.
contains(parm)
→ bool
Returns True if the parameter is in the Channel List.
parm
A hou.Parm.
isSelected(parm)
→ bool
Returns True if the parameter is selected in the Channel List.
parm
A hou.Parm.
isPinned(parm)
→ bool
Returns True if the parameter is pinned in the Channel List.
parm
A hou.Parm.
isValueSelected(parm)
→ bool
Returns True if the parameter has its value column selected in the Channel List.
parm
A hou.Parm.
filter()
→ str
Returns the channel list filter string.
keepSelection()
→ bool
Returns the channel list Keep Selection flag.
enableFilter()
→ bool
Returns True if the channel list filtering is active.
filterRotates()
→ bool
Returns True if the channel list rotations filtering is active.
filterTranslates()
→ bool
Returns True if the channel list translations filtering is active.
filterScales()
→ bool
Returns True if the channel list scales filtering is active.
setFilter(self,pattern)
`
Set the channel list filter string.
pattern
A pattern string.
setKeepSelection(self,on)
Set the channel list Keep Selection flag.
setEnableFilter(self,on)
Enable/Disable the channel list filtering.
setFilterRotates(self,on)
Enable/Disable channel list rotations filtering.
setFilterTranslates(self,on)
Enable/Disable channel list translations filtering.
setFilterScales(self,on)
Enable/Disable channel list scales filtering.
addGeometryChannels(geometry, collection_name=None, pattern=None, selected=True, pinned=False, valueselected=False)
→ str
Adds a collection of geometry channels to the channel list, constructed from the channel primitives present in the provided geometry. Returns the name of the geometry channels collection. If no name is provided, a unique name will be created. Note that any modifications to the scoped channels are not immediately reflected in the channel primitives, but must be manually updated using hou.anim.mergeGeometryChannels.
The following shows an example workflow of adding geometry channels to the channel list, listening for updates, and setting modified channels back in to channel primitives:
channel_list = hou.ChannelList() collection_name = "test_collection" # g is any hou.Geometry with channel primitives. channel_list.addGeometryChannels(g, collection_name) hou.playbar.setChannelList(channel_list) # Mutable geometry in which to write modified channel primitives. output_geometry = hou.Geometry() def channels_changed(channel_names, collection_name): print(f"Channels in {collection_name} were modified: ", channel_names) # Write the changed channels back in to channel primitives. hou.anim.mergeGeometryChannels(collection_name, output_geometry, channel_names) # Called whenever geometry channels added to the channel list are modified, # such as when they are edited in the Animation Editor. hou.anim.addGeometryChannelsChangedCallback(collection_name, channels_changed)
geometry
collection_name
An optional name for the geometry channels collection. If not provided, a unique name will be created. If a collection with the same name already exists, it will be overwritten.
pattern
A pattern string, None by default. If provided, only channel primitives matching the pattern will be added to the collection.
selected
Select all channels in the collection, True by default.
pinned
Pin all channels in the collection, False by default.
valueselected
Select the value column of all channels in the collection, False by default.
See also:
addNodeGeometryChannels(node, pattern=None, selected=True, pinned=False, valueselected=False)
→ str
Adds a collection of geometry channels to the channel list, constructed from the channel primitives present in the provided node’s geometry. Returns the name of the geometry channels collection, which will be the same as the node’s path.
node
A hou.SopNode.
pattern
A pattern string, None by default. If provided, only channel primitives matching the pattern will be added to the collection.
selected
Select all channels in the collection, True by default.
pinned
Pin all channels in the collection, False by default.
valueselected
Select the value column of all channels in the collection, False by default.
removeGeometryChannels(collection_name=None)
Removes the geometry channels collection with the provided name from the channel list.
collection_name
Name of the geometry channels collection to remove.
geometryChannelCollectionNames()
→ tuple
of str
Returns a tuple of the names of geometry collections added to the channel list.
geometryChannels(collection_name)
→ tuple
of hou.ChannelPrim
Returns a tuple of channel primitives in a given geometry channels collection.
selectGeometryChannel(collection_name, channel=None)
Selects a geometry channel. If no channel is provided, selects all channels within the collection.
collection_name
Name of the geometry channels collection.
channel
Name of the channel to select. None by default.
deselectGeometryChannel(collection_name, channel=None)
Deselects a geometry channel. If no channel is provided, deselects all channels within the collection.
collection_name
Name of the geometry channels collection.
channel
Name of the channel to deselect. None by default.
pinGeometryChannel(collection_name, channel=None)
Pins a geometry channel. If no channel is provided, pins all channels within the collection.
collection_name
Name of the geometry channels collection.
channel
Name of the channel to pin. None by default.
unpinGeometryChannel(collection_name, channel=None)
Unpins a geometry channel. If no channel is provided, unpins all channels within the collection.
collection_name
Name of the geometry channels collection.
channel
Name of the channel to unpin. None by default.
selectGeometryChannelValue(collection_name, channel=None)
Selects the value column of a geometry channel. If no channel is provided, selects the values of all channels within the collection.
collection_name
Name of the geometry channels collection.
channel
Name of the channel to select. None by default.
deselectGeometryChannelValue(collection_name, channel=None)
Deselects the value column of a geometry channel. If no channel is provided, deselects the values of all channels within the collection.
collection_name
Name of the geometry channels collection.
channel
Name of the channel to deselect. None by default.
containsGeometryChannel(collection_name, channel=None)
→ bool
Returns whether or not a geometry channel is present in the channel list. If a channel name is not provided, returns whether or not the collection is present.
collection_name
Name of the geometry channels collection.
channel
Name of the channel. None by default.
isGeometryChannelSelected(collection_name, channel)
→ bool
Returns whether or not a geometry channel is selected.
collection_name
Name of the geometry channels collection.
channel
Name of the channel.
isGeometryChannelPinned(collection_name, channel)
→ bool
Returns whether or not a geometry channel is pinned.
collection_name
Name of the geometry channels collection.
channel
Name of the channel.
isGeometryChannelValueSelected(collection_name, channel)
→ bool
Returns whether or not the value column of a geometry channel is selected.
collection_name
Name of the geometry channels collection.
channel
Name of the channel.
asCode(self,var_name)
→ str
Returns a python code string that be run to recreate a ChannelList with the same content as the current object.
var_name
The variable name used in the generated code for the channel list.
It defaults to chanlist
.