Auto Save
Auto save is now working again in 2.5. It will also remember now what the location of the original file was when recovering it, so that library links still work and saving the restored file does not save to the temp directory. There is also a new Recover Auto Save operator which will open the filebrowser in the temp directory and show the auto saved .blends. Implemenation Notes: * Timer storage was moved from window to windowmanager, so we can have windowmanager level timers too now, doesn't make sense to have autosave timer attached to a particular window. * FileGlobal now has a filename field storing where the file was saved. Note that this is only used when loading a file through the recover operators, regular file read doesn't use it, so copying the quit.blend manually over the original file will still work as expected. * Jobs timer no longer uses operator now, this seems more like an internal thing, changing keymaps should not make it possible to break the jobs manager. * Autosave is postponed by 10 seconds when a modal operator is running, e.g. transform or file browsing. * Moved setting G.sce in setup_app_data before depsgraph updates, these can use the filename for pointcaches.
This commit is contained in:
@@ -146,7 +146,11 @@ static void rna_UserDef_weight_color_update(bContext *C, PointerRNA *ptr)
|
||||
rna_userdef_update(C, ptr);
|
||||
}
|
||||
|
||||
|
||||
static void rna_userdef_autosave_update(bContext *C, PointerRNA *ptr)
|
||||
{
|
||||
WM_autosave_init(C);
|
||||
rna_userdef_update(C, ptr);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
@@ -2344,11 +2348,13 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE);
|
||||
RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files.");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
|
||||
|
||||
prop= RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "savetime");
|
||||
RNA_def_property_range(prop, 1, 60);
|
||||
RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes) to wait between automatic temporary saves.");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
|
||||
|
||||
prop= RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_range(prop, 0, 30);
|
||||
|
||||
Reference in New Issue
Block a user