Home Technical Talk

Help! Maya Ate My Project!

polycounter lvl 5
Offline / Send Message
Zalek4 polycounter lvl 5

Hi all,

I'm working on a Maya animation project for class/11 second club, and I've run into a fairly distressing problem. 

I finished my project yesterday and rendered it out as an image sequence. I saved the file and shut down for the night. When I came back to work on it today, my scene was empty. No objects or curves display in the outliner or hypergraph, and the .ma file itself is almost 200 Mb. I know it's not empty, and I know my work is there, but I have no idea how to get it back.

I opened the .ma file in Notepad++ to see if there were any instances of #QNAN or #INF, but there were none. All of the objects in the scene were listed in notepad with their position points. 

Any help would be GREATLY appreciated.

Here is a link to the file if anyone is awesome enough to take a look with me:

https://drive.google.com/file/d/1s70kgoOW3fJ-aSSIXONhMvmmfNYRLaPU/view?usp=sharing

Replies

  • throttlekitty
    Offline / Send Message
    throttlekitty ngon master
    Hi @Zalek4, Looks like line 20 looks like your culprit, an invalid transform on the persp camera.

    setAttr ".t" -type "double3" -nan(ind) -nan(ind) -nan(ind) ;

    changing this to regular float in np++ values seemed to load ok for me. I found this by checking the script editor/log, one of the first errors looked like the following, which gave me something to search the .ma for.

    // Error: setAttr ".t" -type "double3" -nan(ind) -nan(ind) -nan(ind) ; // 
    // Error: "C:/temp/TempScenes/11SecAni.ma" line 21.39: Invalid use of Maya object "ind". // 
  • Zalek4
    Offline / Send Message
    Zalek4 polycounter lvl 5
    Hi @throttlekitty !

    Thanks a TON for helping me out! Just to clarify, what should the syntax look like when I change it? Am I replacing "double3" with "regularfloat", or am I replacing "-nan(ind)" ?

    Or none of the above? I'm not familiar with the code for .ma files :) 

    Again, thanks a lot!

    Edit: I figured it out and it loads great! Thanks! New problem: Maya crashes when I try to save the fixed file. Any ideas?
  • throttlekitty
    Offline / Send Message
    throttlekitty ngon master
    Try giving the persp camera a quick tumble before saving? I didn't see any other big errors, I don't have Arnold installed right now so I got complaints about that.

    You aren't trying to animate that one, are you? Just in case you didn't know, try to avoid serious edits to the default cameras aside from just using them for viewing.
  • TTools
    Offline / Send Message
    TTools polycounter lvl 4
    @Zalek4
    -nan(ind) is shorthand codespeak for -NotANumber(Indeterminate)

    What that means is that when maya wrote out the .ma file, it couldn't figure out what those numbers should be, so it sh$t the bed and fail-safe to codespeak.  This is often times due to very large or small numbers that confuse maya.

    One remedy is to make a copy of your .ma file, then open the original in Notepad++, Wordpad, or Notepad.

    Search for: "   -nan(ind)  "

    It should take you to this line:
    setAttr ".t" -type "double3" -nan(ind) -nan(ind) -nan(ind) ;
    replace each case of -nan(ind) with the number 0.0

    This will give you:
    setAttr ".t" -type "double3" 0.0 0.0 0.0 ;

    You could also just do a search/replace of the whole file to replace -nan(ind) with 0.0 if you want to do it all at once.
    Save the file in the text editor, then try and open it in Maya.  Your error should be gone.  It will have modified that attribute to 0.0, 0.0, 0.0, but that's better than a file that won't open!

    FYI, in the olden days, Indeterminates or NANs used to show up as #IND and/or #NAN for easy search/replacing.  You might do a check for those as well.

    I really wish Maya wouldn't fail on this and instead would give a warning and automatically do a replace in the ascii with 0.0 on open so at least it wouldn't leave people with completely unusable files.  Oh well...a person can wish!
  • throttlekitty
    Offline / Send Message
    throttlekitty ngon master
    Oh I totally forgot to address that. I'm 81% sure that you need to use float values instead of integers on that setAttr, 0.0 instead of straight 0.

    It is annoying that the whole rest of the file fails because of that. One would think that since they decided to write nan(ind) that they'd have the courtesy to at least replace it with an appropriate default value when reading it. (but what would i know)
  • Zalek4
    Offline / Send Message
    Zalek4 polycounter lvl 5
    @TTools @throttlekitty
    Thanks so much! You guys don't know how much you helped! My assignment is due tomorrow and I about had a breakdown when I realized I couldn't render what was in the file. It's 80% done now thanks to you.
  • TTools
    Offline / Send Message
    TTools polycounter lvl 4
    @throttlekitty Good lookin out.  I think you're right about it requiring floats instead of integers!  :#
    @Zalek4 Glad to help.  Good luck with your assignment!


  • jfielding
    OMG. I saw a bunch of posts about the QNAN and NAN, but my file still wasn't working after changing those. I legit signed up for this forum just to thank you for pointing out how to look for IND and how to fix it. That just saved my artist's ass who would have otherwise lost a full day of work.
Sign In or Register to comment.