Jump to content
Sign in to follow this  
-ant-

Script to select visible geometry

Recommended Posts

Hello,

I am able to select visible geometry manually, or even make a script to toggle the option to select geometry manually. But I'm wondering if there is a way to automatically select visible geometry only via a script? I have been unable to figure it out but it would be awesome if possible (may not be possible though?).

Thanks!
Ant

Share this post


Link to post
Share on other sites

This will select the OBJ-level nodes that have their Display Flag set to True"
 

OBJ = hou.node("/obj")
objnodes = OBJ.children()
mylist = []

for n in objnodes:
    print n
    if n.isDisplayFlagSet() == True:
        mylist.append(n)
print mylist

for i in mylist:
    hou.ObjNode.setSelected(i, 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
Sign in to follow this  

×