Hi, I'm learning python in houdini now and I saw recently that when I use some nodes and want to script their channelsI can only use HScript…
Is that true? F.E. (see image below) I made curve (2points), then resample and then i added point node - I want to be sinusoidal.
My default scripting language is pytho - when i write sin(($TX+$F/1000)*600)/5 - eveything works (but it's Hscript - isn't it?)
and when i want to use something like hou.frame() it doesn't work.
WHEN I'M USING OTHER NODES THE EXPRESSIONS FROM PYTHON (f.e. hou.frame() ) are working.
Additional the “windows” are red and when I switch to Hscript the're green.
I really please about help
Python not allowed in some nodes?
3394 5 2- danilo2
- Member
- 277 posts
- Joined: 7月 2006
- Offline
- pbowmar
- Member
- 7025 posts
- Joined: 7月 2005
- Offline
- symek
- Member
- 1390 posts
- Joined: 7月 2005
- Offline
danilo2He there!
Hi, I'm learning python in houdini now and I saw recently that when I use some nodes and want to script their channelsI can only use HScript…
Is that true? F.E. (see image below) I made curve (2points), then resample and then i added point node - I want to be sinusoidal.
My default scripting language is pytho - when i write sin(($TX+$F/1000)*600)/5 - eveything works (but it's Hscript - isn't it?)
and when i want to use something like hou.frame() it doesn't work.
WHEN I'M USING OTHER NODES THE EXPRESSIONS FROM PYTHON (f.e. hou.frame() ) are working.
Additional the “windows” are red and when I switch to Hscript the're green.
I really please about help
After changing default expression language for a node, delete any existing expression in parameters. $TX for example is not a valid python expression, so putting hou.frame() at the front of it doesn't make sense.
- change expression language
- delete existing channeles ( Ctrl+Shift+LMB)
- do your stuff (with hou.lvar(“TX”) call to access local variables)
hope this helps,
skk.
PS red background means that the expression in a parameter is of another type then a one specified as default for a node. If default is python, red bk have hscript expressions and vice versa.
- danilo2
- Member
- 277 posts
- Joined: 7月 2006
- Offline
- graham
- Member
- 1907 posts
- Joined: 11月 2006
- Offline
- danilo2
- Member
- 277 posts
- Joined: 7月 2006
- Offline
thank you Is there any list of commands like this one?
When I'm for example using Hscript and I click on question mark I'm getting list of all Hscript local variables, but with python I have to use other structures or as Symek has wrote, I have to use something like hou.lvar(“…”).
Is there any table with only “python ways” to access these vars?
When I'm for example using Hscript and I click on question mark I'm getting list of all Hscript local variables, but with python I have to use other structures or as Symek has wrote, I have to use something like hou.lvar(“…”).
Is there any table with only “python ways” to access these vars?
-
- Quick Links