Quickly toggle Display flag between two nodes? (H19)

   9491   10   4
User Avatar
Member
743 posts
Joined: 8月 2019
オフライン
I read this:

1 and 2 to update display and render flags
I use this all the time, I think a hangover from using nuke too much. With the current node selected, hit 1 to set its display flag to here, 2 to set its render flag. This is often much faster than trying to hit that tiny blue rectangle.

Hitting 1 repeatedly cycles between the selected node and the last created node, handy for doing a quick comparisons (analogous to nuke and setting 1 to a node, 2 to another, and tapping 1 2 1 2 to compare them)

In H16 these 1 and 2 hotkeys have been replaced with R and E.

from https://www.tokeru.com/cgwiki/index.php?title=HoudiniUserInterfaceTips#customise_right_click_menus [www.tokeru.com]

But neither works for me. 1 and 2 are quickjump. R and E do toggle flags, but the way they work is completely different from what CGWiki describes. R activates a "flag toggle mode" and I have to click the node after.

What I'd like is the exact behaviour CGWiki describes:

With the current node selected, hit _ to set its display flag to here

and

Hitting _ repeatedly cycles between the selected node and the last created node, handy for doing a quick comparisons

is it possible in H19?
User Avatar
Member
8375 posts
Joined: 9月 2011
オフライン
I just use undo/redo for this. It's not ideal but it works.
User Avatar
Member
1872 posts
Joined: 5月 2006
オフライン
Yeah the behavior of nodes and display flags changed substantially when the Houdini got a revamp of the node editor. I should go and take those sections out of the wiki, sorry 'bout that.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
242 posts
Joined: 1月 2016
オフライン
Maybe this might help?

https://lex.ikoon.cz/network-editor-remember-the-previously-flagged-node-and-unflag-to-it/ [lex.ikoon.cz]

It is poor man's script, but works for me.
User Avatar
Member
5312 posts
Joined: 2月 2012
オフライン
I want to implement something like this also. It's definitely very useful, like in Nuke, as well as the ability to pin multiple nodes in parameters pane on demand unlike Nuke where they are always visible.

There are a lot of UX like this that can really help Houdini.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
User Avatar
Member
9718 posts
Joined: 7月 2007
オフライン
raincole
R and E do toggle flags, but the way they work is completely different from what CGWiki describes. R activates a "flag toggle mode" and I have to click the node after.
I believe by default they should work on selected nodes, if not just make sure Preferences/NetworkEditor/FlagHotkeysWorkOnSelectedNodes is checked

also to toggle between 2 nodes, just select 2 nodes and hit R repeatedly, it will swap display flag between them
or T for render flag
flags that can be set on multiple nodes simultaneously like template E or bypass Q will toggle them on all selected nodes together
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
743 posts
Joined: 8月 2019
オフライン
tamte
also to toggle between 2 nodes, just select 2 nodes and hit R repeatedly, it will swap display flag between them
or T for render flag
flags that can be set on multiple nodes simultaneously like template E or bypass Q will toggle them on all selected nodes together

Oh thank you very much. That's an extremely useful trick!
Edited by raincole - 2021年11月19日 10:45:19
User Avatar
Member
1872 posts
Joined: 5月 2006
オフライン
Oh brilliant! Going straight to the wiki...
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
382 posts
Joined: 7月 2005
オフライン
cool! ... but be sure your mouse pointer is in a network view and you don't accidentally hit R while you're mouse has viewport focus... heh, this tripped me for a second between two null nodes... I didn't see any handles or notice the viewer state flipped to rotation mode so I was seeing onion skinning instead
Edited by sdugaro - 2022年5月29日 22:10:59
User Avatar
Member
70 posts
Joined: 5月 2019
オフライン
tamte
raincole
R and E do toggle flags, but the way they work is completely different from what CGWiki describes. R activates a "flag toggle mode" and I have to click the node after.
I believe by default they should work on selected nodes, if not just make sure Preferences/NetworkEditor/FlagHotkeysWorkOnSelectedNodes is checked

also to toggle between 2 nodes, just select 2 nodes and hit R repeatedly, it will swap display flag between them
or T for render flag
flags that can be set on multiple nodes simultaneously like template E or bypass Q will toggle them on all selected nodes together

Not sure what's up but it doesn't work in H21 for me. It deselects right after first "R" is pressed press. "T" shortcut jumps between 2 selected nodes though.

Preferences/NetworkEditor/FlagHotkeysWorkOnSelectedNodes is checked for me. Maybe a bug?

As workaround, i've used a snippet by lex.ikoon:
1. Example: https://lex.ikoon.cz/network-editor-remember-the-previously-flagged-node-and-unflag-to-it/ [lex.ikoon.cz]
2. Code snippet: https://lex.ikoon.cz/network_parm/ [lex.ikoon.cz]

and placed it inside custom NetworkViewMenu.xmlthat lives at C:\Users\<USERNAME>\Documents\houdini21.0
Here's how full thing looks like:

<?xml version="1.0" encoding="UTF-8"?>
<mainMenu>
    <menuBar>
        <subMenu id="custom_network_tools">
            
            <modifyItem>
                <insertAfter>help_menu</insertAfter>
            </modifyItem>
            
            <label>Custom</label>
            
            <scriptItem id="toggle_node_flags">
                <label>Toggle Render/Display Flag</label>
                <scriptCode><![CDATA[
import hou

selected = hou.selectedNodes()

if len(selected) == 2:
    node_a, node_b = selected[0], selected[1]
    
    if node_a.isRenderFlagSet():
        node_b.setRenderFlag(True)
        try: node_b.setDisplayFlag(True)
        except: pass
    else:
        node_a.setRenderFlag(True)
        try: node_a.setDisplayFlag(True)
        except: pass

elif len(selected) == 1:
    current_node = selected[0]
    last_path = hou.getenv("LAST_FLAGGED_NODE", "")
    
    if current_node.isRenderFlagSet() and last_path:
        last_node = hou.node(last_path)
        if last_node:
            last_node.setRenderFlag(True)
            try: last_node.setDisplayFlag(True)
            except: pass
    else:
        parent = current_node.parent()
        flagged_nodes = [n for n in parent.children() if n.isRenderFlagSet()]
        if flagged_nodes:
            hou.putenv("LAST_FLAGGED_NODE", flagged_nodes[0].path())
            
        current_node.setRenderFlag(True)
        try: current_node.setDisplayFlag(True)
        except: pass
]]></scriptCode>
            </scriptItem>
            
        </subMenu>
    </menuBar>
</mainMenu>

Once Houdini started it will appear under "Custom" menu in Network editor.

Then Edit -> Hotkeys -> search for "Toggle Render/Display" -> add shortcut.
Then select 2 nodes and press shortcut.

Reference:
- custom menus: https://www.sidefx.com/docs/houdini/basics/config_menus.html [www.sidefx.com]
Edited by AnimGraphLabGames - 2026年7月16日 05:03:13
Generalist.
User Avatar
Member
743 posts
Joined: 8月 2019
オフライン
AnimGraphLabGames
Not sure what's up but it doesn't work in H21 for me. It deselects right after first "R" is pressed press. "T" shortcut jumps between 2 selected nodes though.

Yeah because they removed this QoL feature for some mysterious reason in H21. The last version it worked was H20.5.

Edit: Yeah they didn't add it back in H22. We really can't have good things...
Edited by raincole - 2026年7月17日 10:45:21
  • Quick Links