Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Save Scene As not remembering last folder

smbell1979
Enthusiast

Save Scene As not remembering last folder

smbell1979
Enthusiast
Enthusiast

If you do anything in maya that involves picking something from a folder, such as adding a file texture to a shader, then the start folder when you "Save Scene As" is set to that folder.

 

It makes it very tedious to increment a file quickly. I am constantly having to move scene files from tons of different folders across my drive and it's extremely annoying. This didn't use to happen on 2016 and previous versions. It would always remember the last folder you used for saving the scene.

Reply
1,402 Views
4 Replies
Replies (4)

mspeer
Consultant
Consultant
0 Likes

wynandlens
Enthusiast
Enthusiast

Hey I've written a little script that fixes it. I saved it as the usual Hotkey, Ctrl-Shift S

 

 

#saveSceneAs_currentLoc

'''

This prevents Maya from opening a dialog box anywhere else but the current scene's save location.

'''

 

#get current scene's location

full_sn = cmds.file( q=1, sn=1 )

full_sn_split = full_sn.split( '/' )

path = full_sn.replace( full_sn_split[-1], '' )

 

#create a fileDialog that chooses where to save file

multipleFilters = "Maya ASCII (*.ma);;Maya Binary (*.mb);;Maya Files (*.ma *.mb)"

new_file_name = cmds.fileDialog2( startingDirectory=path, fileFilter=multipleFilters )

 

#rename scene to new_file_name

full_sn = cmds.file( rename=new_file_name[0] )

 

#save scene

cmds.file( save = 1 )

 

Anonymous
Not applicable

Nice! I'll give it a shot! Thanks.

0 Likes

wynandlens
Enthusiast
Enthusiast
Sweet!
I've updated it since.
Just tell me if it works for you.
cheers
0 Likes