While working with the curve and ccurve functions in the SeExpr and SeExprSimple nodes I have found that it is impossible to pass any variables to the color vectors of the curve/ccurve functions; however if I define the exact same colors inside of the curve/ccurve it self they function properly. This makes it impossible to pass user parameters or variables defined in the SeExpr Code them selves.
Here is a simple example:
This does not work In SeExpr:
---------------Node------
No. of Color Params: 1
color1= r:1.0 g:1.0 b:0.0 (should be yellow)
----------------RGB Script-------
$pat = noise(10*$u,10*$v);
$out = ccurve($pat,
0.0, $color1, 4,
0.5, [0.5, 0.0, 0.0], 4);
$out
— end node —
however, this does work:
This does work In SeExpr:
---------------Node------
No. of Color Params: 0
----------------RGB Script-------
$pat = noise(10*$u,10*$v);
$out = ccurve($pat,
0.0, [1.0, 1.0, 0.0], 4,
0.5, [0.5, 0.0, 0.0], 4);
$out
— end node —
More over if one tries to define the color inside of the RGB script it also fails, but now if the quantity of nod parameters is changed the defined color jumps around randomly, sometimes working and other times even throwing a NaN error:
This does not work In SeExpr:
---------------Node------
No. of Color Params: 1 <—[Scrubbing the quantity causes $mycol to generate a random
color from a group of potential color including NaN!]
color1= r:1.0 g:1.0 b:0.0 (should be yellow)
----------------RGB Script-------
$mycol = [1.0, 1.0, 0.0];
$pat = noise(10*$u,10*$v);
$out = ccurve($pat,
0.000, $mycol, 4,
0.590, [0.333, 0.000, 0.000], 4);
$out
— end node —