[Closed] Position script expression array issue
Hi! I need some help from you.
I am trying to use and array of numbers in a set expression. And it doesn’t work at all.
How can i do this right? Thanks in advance!
this is my array:
vnr = #(2, 5, 8, 11, 14, 17, 20, 23, 26, 29,32,35,38,41,44,47)
and grp02 is a node array.
this is my function:
Fn PosScript node nr = (
node.position.controller = position_script ()
node.position.controller.addConstant "sp" sh01[1]
node.position.controller.addConstant "par" node.parent
node.position.controller.setexpression "s = sp.mesh;
p = meshop.getvert s " + nr + "
p * sp.transform * (inverse par.transform)
"
)
And this is the code line:
for i in 1 to grp02.count do (PosScript grp02[i] vnr[i])
And this is the result. Basically the numbers from the array has not been written:
- set whole expression text between ( )
- instead of nr it has to be nr as string