Jump to content

Accessing Global detail attributes through Python


atron

Recommended Posts

hi there,

I have a global attribute that i've made in a python node:

citySearcherDistanceTrav = geo.addAttrib(hou.attribType.Global, 'citySearcherDistanceTrav', '')

i've then set the attribute with some floats 

totalDistance = self.stepSize * hou.frame() #speed * time = distance travelled
        dt = str(totalDistance)
        geo.setGlobalAttribValue('citySearcherDistanceTrav',dt) #see image 1

But i can't seem to access the values in the next node directly below. 

I tried find global attrib not sure how to access the data in a python node again.

A

1.png

2.png

Link to comment
Share on other sites

3 hours ago, Atom said:

The Copy node throws away attributes by default. Go to the Attributes tab of the Copy and add your attribute name to the list for downstream forwarding.

Hi Atom, 

 

I can only see copy local variables which is checked. And then the standard topoint,toprimitive,to vertex , set ,mult, add and subtract table. 

What list do i add the variable to.

 

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...