UserPreferences: Enable Blendfile Compression By Default.
IMPORTANT: This will force-enable this option in user preferences, as part of the 5.0 versioning process. Users that do want to keep saving uncompressed blendfiles will have to edit their user preferences accordingly, and re-save them. This commit does _not_ change the setting for an existing blendfile: uncompressed blendfiles will keep being saved as uncompressed. Implements #135735. Pull Request: https://projects.blender.org/blender/blender/pulls/146172
This commit is contained in:
committed by
Bastien Montagne
parent
57342a51f8
commit
00dbb53131
@@ -21,7 +21,7 @@ const UserDef U_default = {
|
||||
.versionfile = BLENDER_FILE_VERSION,
|
||||
.subversionfile = BLENDER_FILE_SUBVERSION,
|
||||
.flag = (USER_AUTOSAVE | USER_TOOLTIPS | USER_RELPATHS | USER_RELEASECONFIRM |
|
||||
USER_SCRIPT_AUTOEXEC_DISABLE),
|
||||
USER_SCRIPT_AUTOEXEC_DISABLE | USER_FILECOMPRESS),
|
||||
.dupflag = USER_DUP_MESH | USER_DUP_CURVE | USER_DUP_SURF | USER_DUP_LATTICE | USER_DUP_FONT |
|
||||
USER_DUP_MBALL | USER_DUP_LAMP | USER_DUP_ARM | USER_DUP_CAMERA | USER_DUP_SPEAKER |
|
||||
USER_DUP_ACT | USER_DUP_LIGHTPROBE | USER_DUP_GPENCIL | USER_DUP_CURVES |
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/* Blender file format version. */
|
||||
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
||||
#define BLENDER_FILE_SUBVERSION 93
|
||||
#define BLENDER_FILE_SUBVERSION 94
|
||||
|
||||
/* Minimum Blender version that supports reading file written with the current
|
||||
* version. Older Blender versions will test this and cancel loading the file, showing a warning to
|
||||
|
||||
@@ -1679,6 +1679,11 @@ void blo_do_versions_userdef(UserDef *userdef)
|
||||
userdef, "VIEW3D_AST_brush_texture_paint", "Brushes/Mesh Texture Paint/Utilities");
|
||||
}
|
||||
|
||||
if (!USER_VERSION_ATLEAST(500, 94)) {
|
||||
/* Force-reset file compression to ON, see #135735. */
|
||||
userdef->flag |= USER_FILECOMPRESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Always bump subversion in BKE_blender_version.h when adding versioning
|
||||
* code here, and wrap it inside a USER_VERSION_ATLEAST check.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#define _DNA_DEFAULT_bUserAssetLibrary \
|
||||
{ \
|
||||
.import_method = ASSET_IMPORT_APPEND_REUSE, \
|
||||
.flag = ASSET_LIBRARY_RELATIVE_PATH, \
|
||||
.flag = ASSET_LIBRARY_RELATIVE_PATH | USER_FILECOMPRESS, \
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
@@ -56,7 +56,8 @@
|
||||
* - When loading old files that don't contain newly added struct members (these will be zeroed)
|
||||
* to set their values use `versioning_{BLENDER_VERSION}.c` source files.
|
||||
* - For startup file data, to update these defaults use
|
||||
* #BLO_update_defaults_startup_blend & #blo_do_versions_userdef.
|
||||
* #BLO_update_defaults_startup_blend, #blo_do_versions_userdef, and #U_default or
|
||||
* #U_theme_default.
|
||||
*/
|
||||
|
||||
#define DNA_DEPRECATED_ALLOW
|
||||
|
||||
Reference in New Issue
Block a user