Switch subnet hierarchy selectable flags

   2190   2   1
User Avatar
Member
622 posts
Joined: Nov. 2013
Offline
Hi,

I organized a lot of props in subnet hierarchy. I need often switch selectable flag for some subnet and all children.
And it seemed click top level subnet not affect it's children.

Any way to do this without diving into every subnet hierarchy and click object flag one by one ?

Thanks!
User Avatar
Staff
476 posts
Joined: April 2014
Offline
One way is to create a smart bundle and set it's filter string to the subnet name + “/*”

So let's say you want to set the selectable flag recursively on all the OBJ node under /obj/subnet1.

Create a Smart Bundle from the pane.
Double click on it edit it's filter string.
Write: /obj/subnet1/*

On the right pane of the bundle list editor, change the Filter combo box to “Any Object”.
You should now have a smart bundle holding all the object nodes inside the subnet.

Now, click the Select Arrow button on the Bundle list toolbar.
It will toggle the selectable flag on all the bundle nodes.

Another way would be to add a custom menu to the Network Editor RMB menu that does it using python and hom.Node.recursiveGlob(). If it's something you wish to do all the time, it's the direction I would take. It's also a great exercise to learn python and xml menus in Houdini.

Attachments:
smart_bundle_for_selecting children.jpg (45.9 KB)

User Avatar
Staff
138 posts
Joined: Dec. 2010
Offline
ideally you would create a digital asset to manage things more precisely, but if you don't need to do that, you can do it with simple channel references.

go to your subnet object's Subnet tab, find the toggle labeled “Viewport Selecting Enabled”. RMB on the toggle and Copy Parameter.
Dive into your subnet.
Select all the objects you want to affect.
Under the Misc tab, find the same toggle, RMB>“Paste Copied Relative References to Selected”.

All the affected objects will now be controlled by the Subnet's Selectable flag.
Toggles can contain expressions just like any other parameter.
john mariella
Senior Technical Director
SideFX
www.sidefx.com
  • Quick Links