[Sidefx-houdini-list] problem using hom setExpression from callback script
daniel.flood at drdstudios.com
Sun Sep 11 02:46:02 EDT 2011
I'm setting an expression via hou.node().parm().setExpression(), and I have
a problem where the parameter expression evaluates correctly, however when
triggered from a callback script (either code in a shelf button, or a parm
gui callback script), I the node goes red and shows the following error:
"Channel Evaluation Error Bad data type for function or operation"
here's my callback:
This expression evaluates error free if ran from the hython shell, however
if called back from a shelf button, if throws up a red node / MMB click
error (note that the parm is actually being evaluated correctly). I did
notice that the following expression when set by the same method evaluates
without any error:
So it seems I am not doing a good job of declaring my data types as it seems
happy with integers and not strings. Could this be because strcmp returns an
integer, I'm mixing up data types? If so any suggestions for how I should do
it? Could this be some python parsing error, as the injected hscript
expression does evaluate correctly?
So I'm at my wit's end on this...any ideas would be greatly appreciated!
even the example on the sidefx docs seem to show mixing data types in an
"ifs" statement: http://www.sidefx.co...expressions/ifs
More information about the Sidefx-houdini-list