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-12-16 03:38:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-16 03:41:46 +0300
commit5de109cc2d220ca3bd731216b9cd521269ad663e (patch)
treea97d9cff164edd723aa66c81b78281b5cf99ef24 /source/blender/blenloader/BLO_writefile.h
parent4b12f521e38fedf09485e0436e339031f363130a (diff)
Remove G.relbase_valid
In almost all cases there is no difference between `G.relbase_valid` and checking `G.main->filepath` isn't an empty string. In many places a non-empty string is already being used instead of `G.relbase_valid`. The only situation where this was needed was when saving from `wm_file_write` where they temporarily became out of sync. This has been replaced by adding a new member to `BlendFileWriteParams` to account for saving an unsaved file for the first time. Reviewed By: brecht Ref D13564
Diffstat (limited to 'source/blender/blenloader/BLO_writefile.h')
-rw-r--r--source/blender/blenloader/BLO_writefile.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenloader/BLO_writefile.h b/source/blender/blenloader/BLO_writefile.h
index 9bc3714ff38..57b1199a870 100644
--- a/source/blender/blenloader/BLO_writefile.h
+++ b/source/blender/blenloader/BLO_writefile.h
@@ -60,6 +60,11 @@ struct BlendFileWriteParams {
uint use_save_versions : 1;
/** On write, restore paths after editing them (see #BLO_WRITE_PATH_REMAP_RELATIVE). */
uint use_save_as_copy : 1;
+ /**
+ * Saving from the UI writes into the #Main.filepath, so a check for the `filepath`
+ * not having been set is needed.
+ */
+ uint use_save_first_time : 1;
uint use_userdef : 1;
const struct BlendThumbnail *thumb;
};