Maya File somehow losing it's Name

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  03 March 2013
Maya File somehow losing it's Name

I have a Maya file, that when I open it, loses it's Name.

in other words, I can't Save the File - Maya can't find the name, so it opens the Save As Dialog.

After opening the file:

cmds.file(save=True, type='mayaAscii')
// Error: A file must be given a name before saving. Use file -rename first, then try saving 
again.


Querying the name returns nothing:
cmds.file(q=True, sn=True)


Querying the full path and filename works, so i can manually rename the file back to its name, but this seems like a bug...

filename = cmds.file(q=True, exn=True)
// Result: C:/Temp/MyFile.ma //


Anyone else encourtered this problem?
 
  03 March 2013
are you saving binary to ascii or ascii to binary file?
 
  03 March 2013
it's ascii, and as far as i can tell, the file information is intact.
seems like maya has trouble parsing the file when it is opened, preventing the file name from getting registered with maya. the file also fails to appear on the "recently opened" list.
 
  03 March 2013
Are there any tracebacks in the script editor after opening the file?

You can try renaming the file in a python script editor:

from maya import cmds
cmds.file( rename='test.ma' )

After doing that, try saving it again, and reopen it.
__________________
...everything will be fine, as long as nothing goes wrong...
 
  03 March 2013
yea the problem with that is that renaming the file loses the original path to the file.
A new path is constructed under the current project with the new name.

so, if the file isn't opened under a project that reconstructs the exact same full path, the file ends up getting saved in a new location.
 
  03 March 2013
I remembered this problem now, once I have this kind of problem from the galaxy far far away.

You are using the save option without inputting a file name, the command should be:

cmds.file( f = true, type='mayaAscii', save=True)


Forcing maya to save the file with the current file name.

Or:
cmds.file( 'nameOfYourMayaFile.ma', f = true, type='mayaAscii', save=True)


Either of the 2 commands should work.
__________________
We are the captives of our own identities,
living in the prisons of our own creations.
 
  03 March 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:47 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.