diff --git a/source/blender/blenloader/BLO_writefile.h b/source/blender/blenloader/BLO_writefile.h index 746c663926d..f4f1438e284 100644 --- a/source/blender/blenloader/BLO_writefile.h +++ b/source/blender/blenloader/BLO_writefile.h @@ -57,6 +57,7 @@ struct BlendFileWriteParams { /** On write, restore paths after editing them (see #BLO_WRITE_PATH_REMAP_RELATIVE). */ uint use_save_as_copy : 1; uint use_userdef : 1; + uint use_startup : 1; const struct BlendThumbnail *thumb; }; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 0a4f2fde93f..47e47478c42 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1169,7 +1169,7 @@ bool BLO_write_file(Main *mainvar, if (remap_mode == BLO_WRITE_PATH_REMAP_RELATIVE) { /* Make all relative as none of the existing paths can be relative in an unsaved document. */ - if (G.relbase_valid == false) { + if (G.relbase_valid == false && !params->use_startup) { remap_mode = BLO_WRITE_PATH_REMAP_RELATIVE_ALL; } } diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index d2d080a9a68..144db6aa0ac 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1777,6 +1777,7 @@ static int wm_homefile_write_exec(bContext *C, wmOperator *op) fileflags, &(const struct BlendFileWriteParams){ .remap_mode = BLO_WRITE_PATH_REMAP_RELATIVE, + .use_startup = true, }, op->reports) == 0) { printf("fail\n");