Jump to content

Basic: How access $variables in Python


TonyL

Recommended Posts

I'm sure this is a basic question, but I created an attribute that I don't know how to access in Python. I used an AttribCreate SOP to create a detail variable called LMO. In HScript I could just use it in other SOPs as in "x = $LMO", or "$LMO/2", but that's not working for me in Python. What's the right syntax for accessing this attribute using Python?

Thanks

Link to comment
Share on other sites

Guest Swann

I'm sure this is a basic question, but I created an attribute that I don't know how to access in Python. I used an AttribCreate SOP to create a detail variable called LMO. In HScript I could just use it in other SOPs as in "x = $LMO", or "$LMO/2", but that's not working for me in Python. What's the right syntax for accessing this attribute using Python?

Thanks

hou.lvar() ?

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