Go to: Synopsis. Return value. Flags. Python examples.


savePrefs([colors=boolean], [general=boolean], [hotkeys=boolean], [plugins=boolean], [uiLayout=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

savePrefs is undoable, NOT queryable, and NOT editable.

This command saves preferences to disk. If no flags are specified then all pref types get saved out.

Return value



colors, general, hotkeys, plugins, uiLayout
Long name (short name) Argument types Properties
general(g) boolean create
Save the general prefs to disk (optionVars)
uiLayout(ui) boolean create
Save each window's size and position to disk
hotkeys(hk) boolean create
Save the hotkeys to disk
colors(c) boolean create
Save the color prefs to disk
plugins(pl) boolean create
Save the plug-in prefs to disk

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# only save the hotkeys
cmds.savePrefs( hotkeys=True )

# save everything

# only save ui layout prefs
cmds.savePrefs( uiLayout=True )