fbitonti
02-06-2006, 10:26 PM
hey i'm getting a syntax error on this and I don't know why?
any one know whats up i'm sure it's simple I just don't have the syntax down thta well yet.
The error is showing up around the setattr line.
for ($i = 0; $i < 1; $i++) {
float $pos[];
$pos = `getParticleAttr -at worldPosition ("particle1.pt[" + $i + "]")`;
$x = $pos[0];
$y = $pos[1];
$z = $pos[2];
$p = $i+2;
setAttr "curveShape1.controlPoints[" + $i +"].xValue" $x;
setAttr "curveShape1.controlPoints[" + $i +"].yValue" $y;
setAttr "curveShape1.controlPoints[" + $i +"].zValue" $z;
print ($x);
print ("\n");
print ($y);
print ("\n");
print ($z);
print ("\n");
print ("\n");
print ("\n");
}
any one know whats up i'm sure it's simple I just don't have the syntax down thta well yet.
The error is showing up around the setattr line.
for ($i = 0; $i < 1; $i++) {
float $pos[];
$pos = `getParticleAttr -at worldPosition ("particle1.pt[" + $i + "]")`;
$x = $pos[0];
$y = $pos[1];
$z = $pos[2];
$p = $i+2;
setAttr "curveShape1.controlPoints[" + $i +"].xValue" $x;
setAttr "curveShape1.controlPoints[" + $i +"].yValue" $y;
setAttr "curveShape1.controlPoints[" + $i +"].zValue" $z;
print ($x);
print ("\n");
print ($y);
print ("\n");
print ($z);
print ("\n");
print ("\n");
print ("\n");
}
