hey yall.
i'm new to the forum. so ... how's it ?
i'm in the process of migrating over to shake
and am writing the viewer scripts i need
to make my transition a bit more pleasant.
i launch shake from cli and get no errors.
start a new script ... use one of my fancy vscripts ... no errors.
save and quit. still no errors. cool.
the problem is when a access that same script for further twidling.
my fancy vscript doesn't show up and i get an error like this
#-------
error: VScriptNode.viewerScripts, line 1: expected a )
Guides_(riNode, 720, 486, 2, Hermite(0,[39,0,0]@1)
^
error: VScriptNode.viewerScripts, line 1: expected a )
Guides_(riNode, 720, 486, 2, Hermite(0,[39,0,0]@1)
^
#-------
can anyone shed some light on this one.
i'm sure i'm missing something basic.
i've appended the offending vscript + ui file for you troubleshooting
pleasure.
thanks in advance.
-miles
spam@noesclavo.com
//Guides.h
image Guides_(
image img,
float width = GetDefaultWidth(),
float height = GetDefaultHeight(),
int pointSize = 2,
int left = 100,
int right = width - 100,
int top = height - 100,
int bottom = 100,
float red = 0,
float green = 0,
float blue = 1,
float alpha = 1
)
{
image guides = NGLRender(width, height, 1, "
nglBegin(NGL_LINES);
nglPointSize(pointSize);
nglColor4f(red, green, blue, alpha);
nglVertex2f(left, top);
nglVertex2f(right, top);
nglVertex2f(right, top);
nglVertex2f(right, bottom);
nglVertex2f(right, bottom);
nglVertex2f(left, bottom);
nglVertex2f(left, bottom);
nglVertex2f(left, top);
nglEnd();
");
return Over(guides, img);
}
//GuidesUI.h
nfxDefViewerScript("Guides", "Guides_()", "guides");
nuiDefSlider("Guides_.right", 0, width);
nuiDefSlider("Guides_.left", 0, width);
nuiDefSlider("Guides_.top", 0, height);
nuiDefSlider("Guides_.bottom", 0, height);
nuiDefSlider("Guides_.pointSize", 1, 10);