This came up on another message board, and I thought I would try my hand at helping the poster out, but I have run into some problems.
Here is what I have done.
create a poly cube, and name it Bill. Select all the verts then source and execute the following script.
global proc vertExp()
{
string $selVerts[] = ls -sl -fl;
int $numverts = size ($selVerts);
print ($numverts +"n");//debug
for ($i=0; $i {
//string $expNameX = "vertexexpressionX";
//string $expNameY = "vertexexpressionY";
//string $expNameZ = "vertexexpressionZ";
expression -o ("BillShape.pnts["+$i+"].pntx") -s {"0.2 * sin(time+(0.1*"+$i+"))"} -ae 1 -uc all ;
expression -o ("BillShape.pnts["+$i+"].pnty") -s {"0.2 * sin(time+(0.1*"+$i+"))"} -ae 1 -uc all ;
expression -o ("BillShape.pnts["+$i+"].pntz") -s {"0.2 * sin(time+(0.1*"+$i+"))"} -ae 1 -uc all ;
}
}
When I execute it, I get the following:
source vertExp; vertExp;
8
// Error: {0.2 * sin(time+(0.1*0)); //
// Error: Line 1.4: Syntax error //
I'm not sure where this error is being generated. Is it happening when the expression editor tries to create the expression?
Also, where is the curly brace at the begining of the expression coming from?
Can anyone shed some light?