nuke.nodesSelected

nuke.nodesSelected() None
Returns:

true if any nodes are currently selected