Jump to content
ikoon

selectedNodes are yellow, but what is the "pink" state? (python)

Recommended Posts

Please, if you select node(s) and then click anywhere in the empty area of Network Editor, nodes are deselected, and last selected node gets pink outline. Can I get this pink node's path in the Python? The pink node is not listed in the selectedNodes() but it is still the actual node in the Parameters pane.

selected.PNG

Share this post


Link to post
Share on other sites

Pink node is a current node which is available in parm editor. To get it with python use something like this:

network_editor = hou.ui.curDesktop().paneTabOfType(hou.paneTabType.NetworkEditor)

cur_node = network_editor.currentNode()

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you very very much Alexey! Tons of future errors are wiped out :)
Btw I have two Network Editors and this works nicely:

parm_pane = hou.ui.curDesktop().paneTabOfType(hou.paneTabType.Parm)
node = parm_pane.currentNode()

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×