pymel.core.system.autoSave

autoSave(*args, **kwargs)

Provides an interface to the auto-save mechanism. In query mode, return type is based on queried flag.

Flags:
Long name (short name) Argument Types Properties
destination (dst) int ../../../_images/create.gif ../../../_images/query.gif
 

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) bool ../../../_images/query.gif
 

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 (‘/’).Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

enable (en) bool ../../../_images/create.gif ../../../_images/query.gif
 
Enables or disables auto-saves.
folder (fol) unicode ../../../_images/create.gif ../../../_images/query.gif
 
Sets the folder for auto-saves used if the destination option is 1.
interval (int) float ../../../_images/create.gif ../../../_images/query.gif
 
Sets the interval between auto-saves (in seconds). The default interval is 600 seconds (10 minutes).
limitBackups (lim) bool ../../../_images/create.gif ../../../_images/query.gif
 
Sets whether the number of auto-save files is limited.
maxBackups (max) int ../../../_images/create.gif ../../../_images/query.gif
 
Sets the maximum number of auto-save files, if limiting is in effect.
perform (p) bool ../../../_images/create.gif
 
Invokes the auto-save process.
prompt (prm) bool ../../../_images/create.gif ../../../_images/query.gif
 
Sets whether the auto-save prompts the user before auto-saving.

Derived from mel command maya.cmds.autoSave

Example:

import pymel.core as pm

import maya.cmds as cmds

# set the interval between auto-saves to 5 minutes
#
pm.autoSave( int=300 )

# query the auto-save interval
#
pm.autoSave( q=True, int=True )
# Result: 300.0 #

Previous topic

pymel.core.system.audioTrack

Next topic

pymel.core.system.cacheFile

Core

Core Modules

Other Modules

This Page