Hi,
I am trying to use a lookup node inside a macro AND let the user be able to control the curves.
I got the curve editor to load within the parameter tab. This is a Good Thing.
But I can't figure out how to pass the curves to a lookup node that is buried inside my macro.
From my UI file:
CODE
nuiPushControlGroup("MyMacro.CurveEditorInsideThis");
nuiPushControlGroup("MyCurves");
nuiGroupControl("MyMacro.FirstCurve");
nuiGroupControl("MyMacro.SecondCurve");
nuiGroupControl("MyMacro.ThirdCurve");
nuiPopControlGroup();
registerCurveFuncColor("MyCurves");
nuiPopControlGroup();
From my macro .h file:
CODE
MyMacro(
...
float FirstCurve = \"HermiteV(x,1,[1,-73.34,-73.34]@0,[0,0.19,0.19]@1)\",
float SecondCurve = \"HermiteV(x,1,[0,69.05,69.05]@0,[0.5122,0,0]@0.5028,[0,-71.43,-71.43]@1)\",
float ThirdCurve = \"HermiteV(x,1,[0,4.11,4.11]@0,[1,77.01,77.01]@1)\"
)
{
...
Lookup1 = Lookup(Monochrome1, FirstCurve, SecondCurve, ThirdCurve, 0);
...
}
This would load the curve editor in the parameters tab.
The curves defined in MyMacro are pre-loaded in the curve editor.
If I look inside my macro, all the curves for my lookup node evaluate to zero.
The console complains 3 times (once for each curve):
CODE
error: NRiScript1.MyMacro.FirstCurve, line 1: unknown variable x
HermiteV(x,1,[1,-73.34,-73.34]@0,[0,0.19,0.19]@1)
^
Any hints would be appreciated.
Thanks.
Xavier