How to "store node network state" so I can restore it later?

   1137   6   1
User Avatar
Member
682 posts
Joined: Aug. 2019
Offline
For example, considering this common KineFX setup:



The selected node is Rig Pose SOP.

The template flag is on a reference geometry node.

The display flag is on the Joint Deform SOP.

Is there a way to "store" the node network state (selected node, which nodes all the flags are on, etc) and restore it later? In other words, I might be working on a totally different SOP network for another unrelated model, but I'd like to press a hotkey or a button to get to the exact selected/template/display state as shown above.

I know Houdini has "Quickmark" (Ctrl+1/2/3/4/5), but Quickmarks only store the selected node, not all the flags.

Attachments:
Screenshot 2025-02-17 231842.jpg (40.3 KB)

User Avatar
Member
5040 posts
Joined: Feb. 2012
Offline
Hi,

AFAIK there is no default feature to do this. You can write some custom Python script to do this, likely storing which node is selected/templated/displayed, etc by name or type and decide how to figure out conflicts in case of ambiguity.
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
682 posts
Joined: Aug. 2019
Offline
I see. Thank you for the answer.

I guess it's worth an RFE... personally this is what I expected Quickmark does.

Someone happened to have this same idea 6 years ago:
https://www.sidefx.com/tutorials/network-editor-quickmarks/ [www.sidefx.com]
User Avatar
Member
99 posts
Joined: Aug. 2017
Online
I also think this could be useful. So I coded a simple implementation of it yesterday. I might keep developing it. Let me know if it works for you Quickflags [github.com].

I made it store only the selected nodes in the current context. Ctrl+Shift+1,2,3,4,5 to store and Shift+1,2,3,4,5 to restore (I think these shortcuts were unused, but I'm not 100% sure). I also added a radial menu, which I think could be better since my code doesn't give you any feedback.

Edit: actually, I'm just testing it at work and I'm seeing that it doesn't pick up the keybinds like on my Linux, let me figure it out; meanwhile you can set them yourself on shelf tools Edit2: apparently I'm using a newer version of keybind overrides that works on 20.5 and not on 20.0
Edited by alexmajewski - Feb. 18, 2025 05:54:06
User Avatar
Member
682 posts
Joined: Aug. 2019
Offline
That's great!

I wonder how Houdini's Quickmark stores the "veiwport of network view" though, a.k.a. which part of the network you're looking at. One issue with storing/restoring flags is that the stored nodes might be far far away, and when you restore them it might not be obvious which nodes are changed.
User Avatar
Member
99 posts
Joined: Aug. 2017
Online
If we look into Quickmarks' radial menu we can find this code:
import nodegraphview
nodegraphview.jumpToQuickMark(kwargs['pane'], 1)
import nodegraphview
nodegraphview.createQuickMark(kwargs['pane'], 1)

So I suppose the next step would be to inspect the nodegraphview module.
User Avatar
Member
99 posts
Joined: Aug. 2017
Online
Hey raincole, I've added updates to my tool [github.com] v1.0.1. I've implemented quickmark-like jumps to network/position. I added a settings menu to turn this behavior on and off.





Initially I just hooked it up to actual quickmarks, but I quickly realized it's going to be problematic because quickmarks store the selection as well, which ruins the whole idea of using Template flags.

You've never really asked for this, so don't feel pressured to use it, but if you do, I hope it helps.

Attachments:
quickmark-like-gif.gif (407.2 KB)
settings.png (7.7 KB)

  • Quick Links