From 7ef6b5cdfdaa1c6f0e80e80f8ca6e2c75eed76f7 Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Thu, 8 Jul 2010 22:07:34 +0000 Subject: 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.) --- source/blender/windowmanager/intern/wm_operators.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index d6f457fdea9..0023ded23f0 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -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 ******** */ -- cgit v1.2.3