Jump to content
craigls

Getting path values in Python

Recommended Posts

IM trying to get the paths of all the geometry from and alembic I threw into a convert node,

and print them out.

Not working though, can someone help?

 

this =hou.pwd()
print (this)
geo = hou.node(this.path() + '/obj/geo1/Splitter/convert1')
print (geo)
path = geo.attribValue('path')
print (path)
    
 

Share this post


Link to post
Share on other sites

Hi Craig,

You can iterate over prims to do that:

node = hou.pwd()
geo = node.geometry()

for pr in geo.prims():
    print pr.attribValue("path")

 

Share this post


Link to post
Share on other sites

Convert sop does not retain path attribute. Unpack the alembic first with keep attribute “path”

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

×