Transfer animation of crashed file to new file without open Maya, is it possible

Transfer animation of crashed file to new file without open Maya, is it possible

ashok3dart
Participant Participant
818 Views
3 Replies
Message 1 of 4

Transfer animation of crashed file to new file without open Maya, is it possible

ashok3dart
Participant
Participant

Transfer animation of crashed file to new file without open Maya, is it possible

Accepted solutions (1)
819 Views
3 Replies
Replies (3)
Message 2 of 4

mcw0
Advisor
Advisor

It's possible if the crashed file is in ASCII format.  I can't remember if Maya defaults to ASCII.  But it would be a real pain.  You'd have to know exactly what you were looking for.  If the animation is only on the one node/hierarchy, then you could search for all "animCurves".  But if you have 2 nodes/hierarchies animated, then you'd have to sort by object name.  And it just gets more complicated from there.

 

But why don't you want to open Maya?  Is it because the file now crashes on opening?

Message 3 of 4

ashok3dart
Participant
Participant

Maya file is in MA, and yes, you are right, while opening the file its crashing, and sometimes it will open and while loading character reference hold's the lag for few hours and Maya get crash without no info, and I have checked the character Asset, to know the issue , but i did't found anything, because other file is working fine. So can you help me on this issue.

0 Likes
Message 4 of 4

mcw0
Advisor
Advisor
Accepted solution

You mentioned another file is working fine.  Is this another version of the same file?  With the same nodes animated?  Just trying to find an easy way to compare the 2 files.  If they are different versions of the same file, you could do a file difference between the 2 files.  A lot of text editors will display the differences between 2 files and allow you to copy and paste from one to the other.  But ultimately, you need to parse the problematic file for animCurves.  

 

How are your scripting skills?  What you want to do is open the file that works in a text editor.  Do a search for "animCurve".  Identify the block of code that creates the animCurve.  It will have "createNode" at the start of the line, like the following:

 

createNode animCurveTL -n "locator1_translateX";
    rename -uid "A06E10CE-44B6-AFA1-4D2D-E29A66F68E60";
    setAttr ".tan" 2;
    setAttr ".wgt" no;
    setAttr -s 2 ".ktv[0:1]" 1 0 30 1.9948414473168397;
createNode animCurveTL -n "locator1_translateY";
    rename -uid "2DEDE12D-4121-FD79-ECA2-8BBD6A985C12";
    setAttr ".tan" 2;
    setAttr ".wgt" no;
    setAttr -s 2 ".ktv[0:1]" 1 0 30 3.6801427243036144;

 

Then you want to take note of the names of the animCurves.  Because that is what you will need to search for next for the connectAttr lines.  Like the following:

 

connectAttr "locator1_translateX.o" "locator1.tx";
connectAttr "locator1_translateY.o" "locator1.ty";

 

 

To do this in Mel, use "fopen" to open your crash file.  Use "fgetline" to read each line of your file.  First search for lines with "animCurve".  Use "fwrite" to write these lines to a new file.  Then in those lines, record the names of the animCurves.  After recording the names of the animCurves, search for those names for the "connectAttr" lines.  Again use "fwrite" to write these "connectAttr" lines to your new file.  Once you are done, you can just source this into your open Maya file.  These are the commands that creates the animCurves with all the keyframes.  And then connects the animCurves to their respective nodes.

 

I hope that was clear.  Let me know if you any more info.