I have a tendency to try things with houdini… sometimes lots of things…
sometimes this leads to a bit of a messy graph of nodes in the network… many of which do nothing but waste CPU cycles…
I wonder if anybody knows some good tips for cleaning up after experimenting?
Is there a python command so that i can delete all the nodes that are currently bypassed?
Also is there a command to delete all the nodes that are orphaned?
(god that sounds terrible)
send them to a nice foster home, rather?
thanks
tidy networks
3077 4 1- twelveplusplus
- Member
- 194 posts
- Joined: 8月 2011
- Offline
- Andr
- Member
- 899 posts
- Joined: 2月 2016
- Offline
- mandrake0
- Member
- 644 posts
- Joined: 6月 2006
- Offline
There is some Example:
https://www.sidefx.com/docs/houdini/hom/nodesearch.html [www.sidefx.com]
Made quick a Example Script that searches in network /obj.
You can make a Shelf Tool.
https://www.sidefx.com/docs/houdini/hom/nodesearch.html [www.sidefx.com]
Made quick a Example Script that searches in network /obj.
You can make a Shelf Tool.
# Import import hou import nodesearch # Define Object and Search value network = hou.node("/obj/") matcher = nodesearch.State("bypass", True) # Get Nodes findNodes = matcher.nodes(network=network, recursive=True) # Delete each node for node in findNodes: node.destroy()
Edited by mandrake0 - 2019年8月26日 14:56:57
- goldfarb
- スタッフ
- 3464 posts
- Joined: 7月 2005
- Offline
- tamte
- Member
- 8839 posts
- Joined: 7月 2007
- Offline
just make sure the script is robust enough to remove only truly unused nodes
since even bypassed/orphaned nodes can have parameters that are referenced somewhere else
and nodes themselves still may be referenced by path, which would not necessarily cook them if bypassed but the branch will not be found if deleted
I'd recommend doing cleanup by hand to keep track of the changes in the file and avoid future surprises
since even bypassed/orphaned nodes can have parameters that are referenced somewhere else
and nodes themselves still may be referenced by path, which would not necessarily cook them if bypassed but the branch will not be found if deleted
I'd recommend doing cleanup by hand to keep track of the changes in the file and avoid future surprises
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links