[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30135] trunk/blender/source/blender/ windowmanager/intern/wm_operators.c: filebrowser

Andrea Weikert elubie at gmx.net
Fri Jul 9 00:07:36 CEST 2010


Revision: 30135
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30135
Author:   elubie
Date:     2010-07-09 00:07:34 +0200 (Fri, 09 Jul 2010)

Log Message:
-----------
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.)

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2010-07-08 20:58:34 UTC (rev 30134)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2010-07-08 22:07:34 UTC (rev 30135)
@@ -830,7 +830,7 @@
 	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 @@
 	
 	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 ******** */





More information about the Bf-blender-cvs mailing list