Commit: 95bf31e4fee327f9d0ca7e017997642398e2b023
Author: Campbell Barton
Date:   Wed Nov 27 21:15:19 2013 +1100
http://developer.blender.org/rB95bf31e4fee327f9d0ca7e017997642398e2b023

Resolve T37240: saving a new file always had absolute paths, now remap.

===================================================================

M       source/blender/windowmanager/intern/wm_operators.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_operators.c 
b/source/blender/windowmanager/intern/wm_operators.c
index a9c7610..a4c389d 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2652,6 +2652,15 @@ static int wm_save_mainfile_invoke(bContext *C, 
wmOperator *op, const wmEvent *U
        
        RNA_string_set(op->ptr, "filepath", name);
 
+       /* if we're saving for the first time and prefer relative paths - any 
existign paths will be absolute,
+        * enable the option to remap paths to avoid confusion [#37240] */
+       if ((G.relbase_valid == false) && (U.flag & USER_RELPATHS)) {
+               PropertyRNA *prop = RNA_struct_find_property(op->ptr, 
"relative_remap");
+               if (!RNA_property_is_set(op->ptr, prop)) {
+                       RNA_property_boolean_set(op->ptr, prop, true);
+               }
+       }
+
        if (G.save_over) {
                if (BLI_exists(name)) {
                        uiPupMenuSaveOver(C, op, name);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to