Houdini 21.0 Python scripting hou hou.qt

hou.qt.NodeChooserButton class

A button with the Houdini look and feel that opens the Houdini node chooser dialog when clicked.

On this page

This class inherits from Qt’s QtWidgets.QToolButton class.

Signals

nodeSelected(hou.Node)

This signal is emitted when a selection is made in the node chooser dialog.

nodePathsSelected(str)

This signal is emitted when a selection is made in the node chooser dialog. The signal’s argument is a string of semi-column separated paths. The paths can be relative paths if the button has a valid relative_to_node and the user toggled 'Export Relative Paths' in the dialog. The paths are absolute otherwise.

chooserStarted()

This signal is emitted before the chooser dialog is opened.

Methods

Examples

This example demonstrates creating a chooser button for SOP nodes and hooking it to a callback function that is invoked when a node is selected from the chooser dialog:

def onNodeSelected(node_path):
    print("Selected node:", node_path)

node_chooser_btn = hou.qt.NodeChooserButton()
node_chooser_btn.setNodeChooserFilter(hou.nodeTypeFilter.Sop)
node_chooser_btn.nodeSelected.connect(onNodeSelected)

hou.qt