Jump to content
haikalle

hou.pwd().geometry() gives an error

Recommended Posts

Hi!

Could someone help me with this. If I use line like this : geo = hou.pwd().geometry()  it gives an error:

AttributeError: 'Node' object has no attribute 'geometry'

 

screenshot.png

Share this post


Link to post
Share on other sites

hou.pwd() refers to the node that's currently being processed, such as when a callback script is running in an HDA. you don't currently have a SOP node that you're running the code on at all.

first create a SOP network, then a node, then you can refer to its geometry(). for example:

myNode = hou.node("/obj/geo1/box1")
myNode.geometry() 

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

×