Revision: 40945
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40945
Author:   campbellbarton
Date:     2011-10-12 00:21:08 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
fix [#28880] relative paths don't work with Change Path/Files

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c       
2011-10-12 00:15:19 UTC (rev 40944)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c       
2011-10-12 00:21:08 UTC (rev 40945)
@@ -2961,9 +2961,11 @@
 
 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 @@
                        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) {

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

Reply via email to