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...
This commit is contained in:
Bastien Montagne 2020-01-14 15:48:37 +01:00
parent 9ad0b7f8c7
commit 51add8e6d0
Notes: blender-bot 2023-02-14 07:17:43 +01:00
Referenced by issue #72255, Video import file path error when importing video from recursive directory, using "Add -> Movie" menu option
1 changed files with 3 additions and 2 deletions

View File

@ -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;