selectedNodes(include_hidden=False)
→ tuple
of hou.Node
Returns a sequence of hou.Node objects representing the nodes that are currently selected.
print("The following nodes are currently selected:") for node in hou.selectedNodes(): print(node.path())
The last selected item has special meaning in Houdini: it controls what network unpinned panes focus on.
selected = hou.selectedNodes() # In Python, a negative index counts from the end print("Following:", selected[-1])
include_hidden
Normally, hidden nodes will not be included in the results, even if they are selected. Use include_hidden=True
to get the selected hidden nodes as well. See hou.Node.isHidden() for more information about hidden nodes.
Replaces |