Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-11-27 14:15:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-11-27 14:15:19 +0400
commit95bf31e4fee327f9d0ca7e017997642398e2b023 (patch)
tree4cb5492fecbc4d610b96aab558ee92083873149c /source/blender/windowmanager
parent2123386c70a740bc8177fb16011c0cf65dd8a2f3 (diff)
Resolve T37240: saving a new file always had absolute paths, now remap.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index a9c7610bf8a..a4c389d82ea 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);