Python querying operator list contents

   3313   4   0
User Avatar
Member
3 posts
Joined: June 2014
Offline
Hello,

can anyone tell me how to query the operator list?
I want to run a simple for loop for each object in the operator list no matter if its a pattern or a bundle.

This should be fairly simply but i can't figure out how.

Thanks!
User Avatar
Member
8081 posts
Joined: July 2005
Offline
Try hou.Node.glob() or hou.Node.recursiveGlob()
User Avatar
Member
3 posts
Joined: June 2014
Offline
Thanks for the reply!

Unfortunately i don't think this is what i'm looking for.
What i have so far:
I added a operator list parameter to a output node.
The user can select objects through it.
The parms on the node reads the following after i selected a few objects.

/obj/sphere_object1 /obj/geo1 /obj/sphere_object3 /obj/geo3 @cube

i would like to query this parameter to get a list with all the objects listed above including the elements from the @cube bundle.

I started to write the code used split, remove… is this the right way? Or is there a simpler way getting the list?

Sorry for the confusion.
User Avatar
Member
8081 posts
Joined: July 2005
Offline
HiHaHo
Unfortunately i don't think this is what i'm looking for.

Did you try? Works for me:

>>> hou.node(“/obj”).recursiveGlob(“box_object1 @bundle1”)
(<hou.ObjNode of type geo at /obj/box_object1>, <hou.ObjNode of type geo at /obj/torus_object1
>, <hou.ObjNode of type geo at /obj/grid_object1>)
User Avatar
Member
3 posts
Joined: June 2014
Offline
works now, thank you!
  • Quick Links