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
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.
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?
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.
-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!
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)
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.
@Zalek4 Glad to help. Good luck with your assignment!