diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-08 20:50:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-08 20:50:55 +0300 |
commit | 1f1245a92a21b4744495549b951caf59fea06765 (patch) | |
tree | 941b6c2cdf7923b445b032996dc7f80591cc6f26 /source/blender/windowmanager/intern | |
parent | 5dffae2346208d7b8185afb99d7ba0465214a515 (diff) |
Remap Relative paths save option.
If you have a blend file and want to save in a new directory enabling this will save with the paths corrected relative to the new directory.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index c39ca20472c..ef586e3065e 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1535,10 +1535,10 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op) fileflags= G.fileflags; /* set compression flag */ - if(RNA_boolean_get(op->ptr, "compress")) - fileflags |= G_FILE_COMPRESS; - else - fileflags &= ~G_FILE_COMPRESS; + if(RNA_boolean_get(op->ptr, "compress")) fileflags |= G_FILE_COMPRESS; + else fileflags &= ~G_FILE_COMPRESS; + if(RNA_boolean_get(op->ptr, "relative_remap")) fileflags |= G_FILE_RELATIVE_REMAP; + else fileflags &= ~G_FILE_RELATIVE_REMAP; WM_write_file(C, path, fileflags, op->reports); @@ -1559,6 +1559,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER); 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."); } /* *************** save file directly ******** */ @@ -1597,6 +1598,7 @@ static void WM_OT_save_mainfile(wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER); 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."); } |