FORUMS: list search recent posts

Simple Mel script

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Patrick Geoffroy
Simple Mel script
on Sep 6, 2012 at 11:52:14 am

Hi there,

I have a question that I'm sure you guys can answer in a blink of an eye.
I know nothing about scripting so a little help would be much appreciated.

I need to get a text file in which I get the X Y Z position of an object, for every frame of an animation. I came across this script over the net which is fine for one frame:

for ($item in `ls -sl`){
$temp=`xform -q -t -ws $item `;
print ($temp[0]+" "+$temp[1]+" "+$temp[2]+"n");};

Could someone help me modify it so it will export as a text file (actually I would prefer it to have the extension .wf) for as many frames I need? Also, how could we add the rotation after the position?

I need a very simple text file with 6 columns and no header. Fist 3 are position then rotation. Each frame on a line with no separation, or comma.

Thanks in advance.

Patrick


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]