irte
12-16-2003, 03:23 AM
im trying to output x y z attributes of a shape's CVs to a file...
Heres my script:
string $sName = `file -q -sceneName`;
$fileId = fopen($sName + ".txt","w");
fprint($fileId, $sName);
int $i;
int $j;
for($i = 0; $i < 7; $i++) {
for($j = 0; $j < 8; $j++){
print($i+" " + $j + "\n");
float $cvInf[] = getAttr("tangShape.cv[$i][$j]");
string $cv0 = $cvInf[0];
string $cv1 = $cvInf[1];
string $cv2 = $cvInf[2];
fprint($fileId, $cv0 + $cv1 + $cv2 + "\n");
}
}
fclose($fileId);
And this is the error I get:
// Error: Invalid attribute index: tangShape.cv[$i][$j] //
But if I just put integers instead of i and j, it works.
I dont understand. :( Thanks
Heres my script:
string $sName = `file -q -sceneName`;
$fileId = fopen($sName + ".txt","w");
fprint($fileId, $sName);
int $i;
int $j;
for($i = 0; $i < 7; $i++) {
for($j = 0; $j < 8; $j++){
print($i+" " + $j + "\n");
float $cvInf[] = getAttr("tangShape.cv[$i][$j]");
string $cv0 = $cvInf[0];
string $cv1 = $cvInf[1];
string $cv2 = $cvInf[2];
fprint($fileId, $cv0 + $cv1 + $cv2 + "\n");
}
}
fclose($fileId);
And this is the error I get:
// Error: Invalid attribute index: tangShape.cv[$i][$j] //
But if I just put integers instead of i and j, it works.
I dont understand. :( Thanks
