Jump to content

Script to select visible geometry


-ant-

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

Link to comment
Share on other sites

  • 4 months later...

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)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...