filebrowser

* filebrowser now should respect User Preference for using relative paths
* Also set remap_relative default to 'True' for saving .blend file
(With 'hide dot files' set and 'relative paths' set in the User Preferences this should now behave as in the suggestion made by brecht - in the future we could remove the user preference and just use the default.)
This commit is contained in:
Andrea Weikert
2010-07-08 22:07:34 +00:00
parent 24f63b2081
commit 7ef6b5cdfd

View File

@@ -830,7 +830,7 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type,
RNA_def_property_flag(prop, PROP_HIDDEN);
if(flag & WM_FILESEL_RELPATH)
RNA_def_boolean(ot->srna, "relative_path", 0, "Relative Path", "Select the file relative to the blend file");
RNA_def_boolean(ot->srna, "relative_path", (U.flag & USER_RELPATHS) ? 1:0, "Relative Path", "Select the file relative to the blend file");
}
void WM_operator_properties_select_all(wmOperatorType *ot) {
@@ -1819,7 +1819,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot)
WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH);
RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file");
RNA_def_boolean(ot->srna, "relative_remap", 0, "Remap Relative", "Remap relative paths when saving in a different directory");
RNA_def_boolean(ot->srna, "relative_remap", 1, "Remap Relative", "Remap relative paths when saving in a different directory");
}
/* *************** save file directly ******** */