Python, focus on the node command? ("G" shortcut by default)

   2359   4   2
User Avatar
Member
46 posts
Joined: March 2015
Offline
Hello there,
I'm very new to python.
I was wondering is there python command/function/method to focus on the node in Network Editor?

Thanks for any suggestions,

Mikhail
Edited by mikhail s - Aug. 25, 2020 16:45:25
User Avatar
Member
270 posts
Joined: July 2013
Offline
See setCurrent() and/or setSelected() in the docs.
More code, less clicks.
User Avatar
Member
46 posts
Joined: March 2015
Offline
Hey, thanks for the reply!
I'm sorry for being not very clear.
Methods you provided are probably about selection operations.
What I mean by focusing is to get Network Editor view being focused/framed on the selected node.
It's “G” short cut by default.
I need the same behavior but operated by python command.
User Avatar
Member
4595 posts
Joined: Feb. 2012
Offline
Hi,

You can use frameSelection() function:
https://www.sidefx.com/docs/houdini/hom/hou/NetworkEditor.html [www.sidefx.com]
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
46 posts
Joined: March 2015
Offline
Thanks Yunus,
I think this is what I'm looking for!


Cheers!


Mikhail
  • Quick Links