nuke.selectedNode

nuke.selectedNode() → Node.

Returns the ‘node the user is thinking about’. If several nodes are selected, this returns one of them. The one returned will be an ‘output’ node in that no other selected nodes use that node as an input. If no nodes are selected, then if the last thing typed was a hotkey this returns the node the cursor is pointing at. If none, or the last event was not a hotkey, this produces a ‘No node selected’ error.

Returns

Node.