Go to: Synopsis. Return value. Related. Flags. Python examples.
autoSave([destination=int], [destinationFolder=boolean], [enable=boolean], [folder=string], [interval=float], [limitBackups=boolean], [maxBackups=int], [perform=boolean], [prompt=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
autoSave is undoable, queryable, and NOT editable.
Provides an interface to the auto-save mechanism.
None
In query mode, return type is based on queried flag.
file, workspace
destination, destinationFolder, enable, folder, interval, limitBackups, maxBackups, perform, prompt
Long name (short name) |
Argument types |
Properties |
|
destination(dst)
|
int
|
|
|
Sets the option for where auto-save files go.
0 - auto-saves go into the workspace autosave folder
1 - auto-saves go into the named folder (set with the -folder flag)
2 - auto-saves go into a folder set by an environment variable (MAYA_AUTOSAVE_FOLDER)
|
|
destinationFolder(df)
|
boolean
|
|
|
Queries the actual destination folder for auto-saves, based on the current
setting of the -destination flag, workspace rules and environment variables.
Resolves environment variables etc. and makes any relative path
absolute (resolved relative to the workspace root).
The returned string will end with a trailing separator ('/').
|
|
enable(en)
|
boolean
|
|
|
Enables or disables auto-saves.
|
|
folder(fol)
|
string
|
|
|
Sets the folder for auto-saves used if the destination option is 1.
|
|
interval(int)
|
float
|
|
|
Sets the interval between auto-saves (in seconds).
The default interval is 600 seconds (10 minutes).
|
|
limitBackups(lim)
|
boolean
|
|
|
Sets whether the number of auto-save files is limited.
|
|
maxBackups(max)
|
int
|
|
|
Sets the maximum number of auto-save files, if limiting is in effect.
|
|
perform(p)
|
boolean
|
|
|
Invokes the auto-save process.
|
|
prompt(prm)
|
boolean
|
|
|
Sets whether the auto-save prompts the user before auto-saving.
|
|
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.
|
import maya.cmds as cmds
# set the interval between auto-saves to 5 minutes
#
cmds.autoSave( int=300 )
# query the auto-save interval
#
cmds.autoSave( q=True, int=True )
# Result: 300.0 #