Hi Evbody,
The new Houdini allows choosing whether you want to use hscript or python. Does it apply to all places inside it, to all params, etc?
For example, what is a python equivalent of $TX, $TY, $TZ, etc?
And, is there a place, where such equivalents would be documented? I've searched the forum, I've searched the docs - all in vain.
I'll be grateful for help with this.
Cheers,
Greg
local variables - is there equivalent in python?
2543 2 1- aiworks
- Member
- 130 posts
- Joined: April 2009
- Offline
- jacob clark
- Member
- 665 posts
- Joined: July 2005
- Offline
Have a look in here.
It's a great intro to some of the basic Python functions.
http://localhost:48626/hom/cookbook/color_falloff/ [localhost]
cheers,
-j
It's a great intro to some of the basic Python functions.
http://localhost:48626/hom/cookbook/color_falloff/ [localhost]
cheers,
-j
- aiworks
- Member
- 130 posts
- Joined: April 2009
- Offline
Thank you!
Your link directed me to the following:
… which is exactly what I was looking for.
Greg
Your link directed me to the following:
In the Hscript expression language, you use $ to evaluate local variables, just like how you evaluate global variables. In Python, you use the lvar function. So, the Python equivalent of $TX is lvar(“TX”).
… which is exactly what I was looking for.
Greg
-
- Quick Links