hyliandanny
03-08-2007, 09:12 AM
I did a search in the forum for quotation marks, but nothing answered this dilemma...
I have a script which has forced me to use these lines:
float $temp[] = `keyframe -in $i -q -vc ("pCube1.translateX")`;
print $temp[0];
fprint $myNew ($temp[0] + " ");
Now, that's fine and dandy, I suppose, but I want to print out translateX along with translateY, Z, rotateX, Y, Z, scale, etc. If I want to do that, then the code becomes:
float $temp[] = `keyframe -in $i -q -vc ("pCube1.translateX")`;
print $temp[0];
fprint $myNew ($temp[0] + " ");
float $temp2[] = `keyframe -in $i -q -vc ("pCube1.translateY")`;
fprint $myNew ($temp2[0] + " ");
// make $temp3, $temp4, ...
which just feels ridiculous (though I suppose I could make it work). Additionally, I want to write to a single line at a time, which I cannot do if I have to keep making new variables and printing them out one by one (this was using a single variable, so a multi-variable solution, I suppose, wouldn't suffer this problem).
I would think you could just replace the variables within the fprint with `keyframe -in $i -q -vc ("pCube1.whatever")`, but this sets off the quotation marks that designate a string to be the output.
Is there a way around that? Is there some much more efficient way I don't know of?
I have a script which has forced me to use these lines:
float $temp[] = `keyframe -in $i -q -vc ("pCube1.translateX")`;
print $temp[0];
fprint $myNew ($temp[0] + " ");
Now, that's fine and dandy, I suppose, but I want to print out translateX along with translateY, Z, rotateX, Y, Z, scale, etc. If I want to do that, then the code becomes:
float $temp[] = `keyframe -in $i -q -vc ("pCube1.translateX")`;
print $temp[0];
fprint $myNew ($temp[0] + " ");
float $temp2[] = `keyframe -in $i -q -vc ("pCube1.translateY")`;
fprint $myNew ($temp2[0] + " ");
// make $temp3, $temp4, ...
which just feels ridiculous (though I suppose I could make it work). Additionally, I want to write to a single line at a time, which I cannot do if I have to keep making new variables and printing them out one by one (this was using a single variable, so a multi-variable solution, I suppose, wouldn't suffer this problem).
I would think you could just replace the variables within the fprint with `keyframe -in $i -q -vc ("pCube1.whatever")`, but this sets off the quotation marks that designate a string to be the output.
Is there a way around that? Is there some much more efficient way I don't know of?
