[Bf-blender-cvs] [51add8e6d0a] blender-v2.82-release: Fix T72255: VSE video addition broken when using recursive filebrowser view.

Bastien Montagne noreply at git.blender.org
Tue Jan 14 15:54:24 CET 2020


Commit: 51add8e6d0a18569c5c4c077b1aba6c5f13a970a
Author: Bastien Montagne
Date:   Tue Jan 14 15:48:37 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rB51add8e6d0a18569c5c4c077b1aba6c5f13a970a

Fix T72255: VSE video addition broken when using recursive filebrowser view.

Fairly straight-forward issue, multi-files selection already feature the
root directory to use, no need to extract it again from a full path...

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

M	source/blender/editors/space_sequencer/sequencer_add.c

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

diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index ee3dceb6acd..589375530f5 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -578,7 +578,8 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
     ED_sequencer_deselect_all(scene);
   }
 
-  if (RNA_struct_property_is_set(op->ptr, "files")) {
+  if (RNA_struct_property_is_set(op->ptr, "files") &&
+      RNA_struct_property_is_set(op->ptr, "directory")) {
     tot_files = RNA_property_collection_length(op->ptr,
                                                RNA_struct_find_property(op->ptr, "files"));
   }
@@ -591,7 +592,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
     char dir_only[FILE_MAX];
     char file_only[FILE_MAX];
 
-    BLI_split_dir_part(seq_load.path, dir_only, sizeof(dir_only));
+    RNA_string_get(op->ptr, "directory", dir_only);
 
     RNA_BEGIN (op->ptr, itemptr, "files") {
       Sequence *seq;



More information about the Bf-blender-cvs mailing list