Disable certain optionVar saving?

Disable certain optionVar saving?

wrath_rage
Explorer Explorer
625 Views
1 Reply
Message 1 of 2

Disable certain optionVar saving?

wrath_rage
Explorer
Explorer

Is there a way to tell maya to not save specific types of optionVars?

specifically the RecentFilesTypeList, it gets disparity from my RecentFilesList and files stop opening, but if I delete the RescenFilesTypeList entries from my userPrefs, the files open fine.

 

another solution is to overwrite the FileMenu.mel file to have the file open action query the type of file and overwrite the argument sent to the procedure to open a file, but I'd rather just not have the type there at all, less information and it still works.

626 Views
1 Reply
Reply (1)
Message 2 of 2

brentmc
Autodesk
Autodesk

Hi,

Since Maya 2023 optionVars can be designated as transient to prevent them from being saved in userPrefs.mel.

 

So, to prevent these optionVars from being saved you could create a userSetup.mel file and add the following command.

 

optionVar -transient -sa RecentFilesList -sa RecentFilesTypeList;

 

Note: You will also need to delete RecentFileTypeList from userPrefs_recents.mel file so you are starting fresh.

Another option is to just remove the RecentFilesTypeList optionVar in userSetup.mel which will force Maya to get the file type from the recent files. (though it means Maya will read all the files in the recents list to get their types so could affect startup if files are on a network drive etc.)

optionVar -rm RecentFilesTypeList;


Documentation link for userSetup.mel:
https://help.autodesk.com/view/MAYAUL/2025/ENU/?guid=GUID-F3D60949-2372-47F5-B8D6-78D73F78D587

Brent McPherson
Principle Engineer