Hi,
in Houdini, similar to Maya as I thought, you can think about two or even three languages:
1. Languages:
- Hscript (look for help in Texport via "help")
- Expressions (look for help in Texport via "exhelp")
- Python
-(gosh, lets add the forth: VEX)
2. Differences in use:
- Hscript executes commands (add operator, delete, rename, link)
- expressions computes a value (compute angle, matrix etx)
- (Python does both)
- (VEX modifies variable's value like point position, surface colour, pixel value etc)
3. Backticks usage:
- backticks allows you to place expressions in hscript...
- or execute expression in a parameter that does NOT expect numeric value (like string parameter)
for example, in file input path, you could write:
op:/`opinputpath(".",0)`
or:
./my_great_texture.`padzero($F-10)`.rat
since this input file field expect string and it couldn't recognize padzero() as an expression in other way.
But in case of translation parameter you need just an expression:
fit01(rand($PT), 0.5, 1))
without backticks, since a parameter expects numeric value anyway.
So:
- using expressions inside hscript requires ``
- you also need `` to evaluate an expression in non-numeric neighborhood, like strings, paths etc.
- but you don't need it if expression is evaluated in numeric parameter.
- you can also in opposite use hscript in expression with "run()" or "execute()" functions.
- both expressions and hscript are accessible in Python with hou.hscript() or hou.hscriptExpression() (Unless they have pure equivalents in Python like opadd == hou.createNode() ).
hope this helps,
Simon.
PS There are also expressions returning strings like points(), chs() and they need backticks also to be executed in parameters but not taken "as is".