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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-12 04:21:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-12 04:21:08 +0400
commit18b9a2d0bcced11e6207ba98e1b92127c3705416 (patch)
tree051b5170ec8a88be617768edd49d19f6be3f612b /source
parent15bf56c696b976a4f74b4b0cae4371ea8008e231 (diff)
fix [#28880] relative paths don't work with Change Path/Files
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index bd93a1270f6..da785430d43 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -2961,9 +2961,11 @@ void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot)
static int sequencer_change_path_exec(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq= seq_active_get(scene);
+ const int is_relative_path= RNA_boolean_get(op->ptr, "relative_path");
if(seq->type == SEQ_IMAGE) {
char directory[FILE_MAX];
@@ -2974,6 +2976,12 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
RNA_string_get(op->ptr, "directory", directory);
+ if (is_relative_path) {
+ /* TODO, shouldnt this already be relative from the filesel?
+ * (as the 'filepath' is) for now just make relative here,
+ * but look into changing after 2.60 - campbell */
+ BLI_path_rel(directory, bmain->name);
+ }
BLI_strncpy(seq->strip->dir, directory, sizeof(seq->strip->dir));
if(seq->strip->stripdata) {