Jump to content
gweiss

Python beginner - selecting all nodes of specific type

Recommended Posts

Hi,

how can I select all nodes of specific type, for example I want to select all the bone nodes and put them inside a network box or just store them in a variable
I tried using hou.objNodeTypeCategory().nodeTypes()['bone'], but couldn't find the way to use the result.

also is there a clean way to add items to a network box, size it around the nodes and layout the nodes inside it?

Thanks
G
 

Share this post


Link to post
Share on other sites
node_type = hou.objNodeTypeCategory().nodeTypes()['bone']
for x in node_type.instances():
    print x

Using instances() should give you the bone nodes in the scene..

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×