diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 0a4f2fde93f..86053e13b34 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1165,15 +1165,6 @@ bool BLO_write_file(Main *mainvar, /* Remapping of relative paths to new file location. */ if (remap_mode != BLO_WRITE_PATH_REMAP_NONE) { - - 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) { - remap_mode = BLO_WRITE_PATH_REMAP_RELATIVE_ALL; - } - } - char dir_src[FILE_MAX]; char dir_dst[FILE_MAX]; BLI_split_dir_part(mainvar->name, dir_src, sizeof(dir_src)); diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index d2d080a9a68..a0e64436075 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -2740,8 +2740,13 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op) * existing relative paths is a good default. * Users can manually make their paths relative & absolute if they wish. */ const eBLO_WritePathRemap remap_mode = RNA_boolean_get(op->ptr, "relative_remap") ? - BLO_WRITE_PATH_REMAP_RELATIVE : + /* Make all relative as none of the existing paths can + be relative in an unsaved document. */ + (G.relbase_valid ? + BLO_WRITE_PATH_REMAP_RELATIVE : + BLO_WRITE_PATH_REMAP_RELATIVE_ALL) : BLO_WRITE_PATH_REMAP_NONE; + save_set_compress(op); if (RNA_struct_property_is_set(op->ptr, "filepath")) {