Pressing R puts the display flag on the selected node.
However, is there a hotkey to do the opposite? In other words, to select the node with display flag.
How to select the node with display flag?
1206 5 0- raincole
- Member
- 540 posts
- Joined: Aug. 2019
- Offline
- raincole
- Member
- 540 posts
- Joined: Aug. 2019
- Offline
A script that does it:
Still I'd like to know if there a built-in way for it.
def get_display_node(): editors = [pane for pane in hou.ui.paneTabs() if isinstance(pane, hou.NetworkEditor) and pane.isCurrentTab()] if not editors: return None network_editor = editors[-1] network_path = network_editor.pwd() display_node = network_path.displayNode() return display_node node = get_display_node() node.setSelected(1,1)
Still I'd like to know if there a built-in way for it.
- nazimba
- Member
- 21 posts
- Joined: Oct. 2019
- Offline
Hello raincole! Thank you for taking the time to send the code. Where would you run it? In a python node inside any Geo node? In the middle of the node stream of any project? Or directly in a python node at object level? Or better in a callback button? I ask this to understand how you would think about structuring many scenes so that it does not become a problem later.
- raincole
- Member
- 540 posts
- Joined: Aug. 2019
- Offline
- alexwheezy
- Member
- 318 posts
- Joined: Jan. 2013
- Offline
This is a good idea. It can also be developed in the direction where you want to get focus on the displayed node without clearing the selection from the current node.
import hou import nodegraphview def focusDispayNode(): editors = [pane for pane in hou.ui.paneTabs() \ if isinstance(pane, hou.NetworkEditor) and pane.isCurrentTab()] if not editors: return None for editor in editors: pwd = editor.pwd() if hasattr(pwd, "displayNode"): nodegraphview.frameItems(editor, (pwd.displayNode(),)) focusDispayNode()
- animatrix_
- Member
- 4741 posts
- Joined: Feb. 2012
- Offline
nazimba
Hello raincole! Thank you for taking the time to send the code. Where would you run it? In a python node inside any Geo node? In the middle of the node stream of any project? Or directly in a python node at object level? Or better in a callback button? I ask this to understand how you would think about structuring many scenes so that it does not become a problem later.
Create a shelf tool and assign a hotkey to it for the fastest access.
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
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
-
- Quick Links