Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-03-15 05:30:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-15 06:48:17 +0300
commit88b24bc6bbbf35bde00c55834330b56708f25897 (patch)
treee236a0d29251c5f83d92c67ee3e577c4dde1516c /source/blender/blenkernel/BKE_global.h
parentd3b4ff6eaa1cb155adf4b2aad4775746bc3ca6df (diff)
Writefile: only include recovery info in auto-save & quit.blend
Previously all blend files included the path they were saved, causing files distributed publicly to include users local paths. This also included developers home directories for startup & userprefs defaults & app-templates bundled with Blender. Now recovery information is only written for auto-save & quit.blend since this is the only time they're intended to be used.
Diffstat (limited to 'source/blender/blenkernel/BKE_global.h')
-rw-r--r--source/blender/blenkernel/BKE_global.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index fc2ce4bf8a5..b3d0e0c9f98 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -179,6 +179,14 @@ enum {
* so keep this as a flag.
*/
G_FILE_RECOVER_READ = (1 << 23),
+ /**
+ * On write, assign use #FileGlobal.filename, otherwise leave it blank,
+ * needed so files can be recovered at their original locations.
+ *
+ * \note only #BLENDER_QUIT_FILE and auto-save files include recovery information.
+ * As users/developers may not want their paths exposed in publicly distributed files.
+ */
+ G_FILE_RECOVER_WRITE = (1 << 24),
/** BMesh option to save as older mesh format */
/* #define G_FILE_MESH_COMPAT (1 << 26) */
/* #define G_FILE_GLSL_NO_ENV_LIGHTING (1 << 28) */ /* deprecated */
@@ -188,7 +196,7 @@ enum {
* Run-time only #G.fileflags which are never read or written to/from Blend files.
* This means we can change the values without worrying about do-versions.
*/
-#define G_FILE_FLAG_ALL_RUNTIME (G_FILE_NO_UI)
+#define G_FILE_FLAG_ALL_RUNTIME (G_FILE_NO_UI | G_FILE_RECOVER_READ | G_FILE_RECOVER_WRITE)
/** ENDIAN_ORDER: indicates what endianness the platform where the file was written had. */
#if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)