Hi to all,
I’m tried create a set expression since code.
the tool have do a set expression on text size parameter of a text node on the project.
I mean, if the user press “ok” on the gui this automatly put a code on size parameter like this:
The problem with your example seems to be the multine syntax. You might solve it with a single line syntax of the if then condition (didn’t tested) and intermediate variables.
I tested manually setting the “multi line” option before running the script and it didn’t worked
@devernay a “isMultiLine” boolean parameter seems to be needeed in the “setExpression” function
but the problem now is when I add a line with a sentencie “if”, I do not get the set expression, simply don’t work.
I know is rare, but I try only line with “if” sentence and don’t add it.
I will continue research.
Thanks again.
Regards.
Hi, I found the problem. I try manually and set expression give me a error with the value return with “ret”.
I have complete the sentence just like I show you here:
I think the problem was that I write if sentence the ret was out the scope of main code, when try intrepreted the code ret was null.
Whatever, it’s working now.