[Sidefx-houdini-list] Setting python expression with HOM

Andy Nicholas andy at andynicholas.com
Mon Dec 12 11:42:02 EST 2016


Hi Sandy,
You can right click on the parameter and do "Edit Expression" to open up 
a multi-line editor.
Cheers,
A

On 12/12/2016 16:39, Sandy Sutherland wrote:
> Hi All,
>
> Anyone how how to apply an expression using something like this -
>
> i.parm('polysoup').setExpression(expr, hou.exprLanguage.Python)
>
> Basically I need to have a python expression something like this -
>
> if ch("../switch") == 0:
> do something amazing
> elif ch("../switch") == 1:
> do another more amazing thing
>
> But I am not sure how to do this from a line of code setting up expr =
> '.....my python expression..', adding in the necessary indents etc...
>
> Thanks
>
> Sandy
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list




More information about the Sidefx-houdini-list mailing list