Jump to content
papsphilip

PYTHON - Access primitive attribute on newly created node

Recommended Posts

i am using python to create a file SOP assign a path and import a bgeo file. After that i am creating some more nodes in my graph and i need a primitive name attribute from that bgeo. From primitive 0

prim = filenode.prim(0) #get first primitive of node filenode
name = prim.attribValue("name") #get primitive attribute name

This throws an error ----> AttributeError: 'SopNode' object has no attribute 'prim'

Is it possible to read the attribute?

Share this post


Link to post
Share on other sites

the answer was this

after i create my file sop and read from disk

prim = filenode.geometry().prim(0)

name = prim.attribValue('name')

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

×