Hi, I was looking at this command but how can I set the lock on multiple geometry/file nodes? Is there a way I can tell it to find all the "file" nodes and set the lock flag?
https://www.sidefx.com/docs/houdini/commands/opset.html [www.sidefx.com]
Set lock on multiple "file" nodes
1997 2 0-
- Angel Fucaraccio
- Member
- 55 posts
- Joined: Oct. 2018
- Offline
-
- Matthew05
- Member
- 94 posts
- Joined: April 2011
- Offline
Hi,
In your case, it might be easier for you to do it in pythton.
First you will have to look for all the instances of the "file" nodeType. Once you have all the instances, you can iterate on it and then set their lock tag using either hscript or python.
Here is an example code:
You can copy that inside a shelf tool and it should do what you want
In your case, it might be easier for you to do it in pythton.
First you will have to look for all the instances of the "file" nodeType. Once you have all the instances, you can iterate on it and then set their lock tag using either hscript or python.
Here is an example code:
node_type = hou.nodeType(hou.sopNodeTypeCategory(), "file") nodes = node_type.instances() for node in nodes: node.setHardLocked(True)
You can copy that inside a shelf tool and it should do what you want
Edited by Matthew05 - Feb. 18, 2021 09:56:00
-
- Angel Fucaraccio
- Member
- 55 posts
- Joined: Oct. 2018
- Offline
-
- Quick Links

