On this page |
This class inherits from Qt’s QtWidgets.QToolButton
class.
Signals ¶
parmSelected(str)
This signal is emitted when a selection is made in the node chooser dialog.
Methods ¶
__init__()
Create and return a new ParmChooserButton object.
setRelativeToNode(relative_to_node)
Set the reference node to use in the node chooser dialog. This will cause the Use Relative Paths checkbox in the dialog to be set. Node paths returned by the node chooser dialog will be relative to the reference node when the checkbox is set.
relative_to_node
must be a hou.OpNode object.
If no reference node is set or if the Use Relative Paths checkbox is not set then returned paths will be absolute.
setInitialSelection(initial_selection)
Set the node that is initially selected when the node chooser dialog is opened.
initial_node
must be a hou.OpNode object.
setCategoryFilter(category_filter)
Set the node type filter used by the node chooser dialog.
category_filter
must be a hou.NodeTypeCategory.
setSelectMultiple(value)
Set if multiple nodes should be selectable with the chooser dialog.
Examples ¶
This example demonstrates creating a chooser button for parms and hooking it to a callback function that is invoked when a node is selected from the chooser dialog:
def onSelected(parm_path): print("Selected parm:", parm_path) node_chooser_btn = hou.qt.ParmChooserButton() node_chooser_btn.parmSelected.connect(onSelected)