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
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2020-03-02 11:23:55 +0300
committerRichard Antalik <richardantalik@gmail.com>2020-03-02 15:16:01 +0300
commit6fa4581d92ef8e2dd47069e47135fd1005072127 (patch)
treeb8e6281d92cbd8cd96c0506657601c22cb94c9c8 /source/blender/editors/space_sequencer/sequencer_add.c
parentbd25df3d6805c613b1a3b9cfcdc7120355cd2440 (diff)
Fix T74334: VSE can't import multiple movie files
Add `directory` RNA property to add operators. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6986
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_add.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 74620a97d01..d3179095e24 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -600,25 +600,17 @@ 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") &&
- RNA_struct_property_is_set(op->ptr, "directory")) {
- tot_files = RNA_property_collection_length(op->ptr,
- RNA_struct_find_property(op->ptr, "files"));
- }
- else {
- tot_files = 0;
- }
+ tot_files = RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files"));
- if (tot_files) {
+ if (tot_files > 1) {
/* multiple files */
char dir_only[FILE_MAX];
char file_only[FILE_MAX];
- RNA_string_get(op->ptr, "directory", dir_only);
-
RNA_BEGIN (op->ptr, itemptr, "files") {
Sequence *seq;
+ RNA_string_get(op->ptr, "directory", dir_only);
RNA_string_get(&itemptr, "name", file_only);
BLI_join_dirfile(seq_load.path, sizeof(seq_load.path), dir_only, file_only);
@@ -783,7 +775,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot)
FILE_SPECIAL,
FILE_OPENFILE,
WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES |
- WM_FILESEL_SHOW_PROPS,
+ WM_FILESEL_SHOW_PROPS | WM_FILESEL_DIRECTORY,
FILE_DEFAULTDISPLAY,
FILE_SORT_ALPHA);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
@@ -843,7 +835,7 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot)
FILE_SPECIAL,
FILE_OPENFILE,
WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES |
- WM_FILESEL_SHOW_PROPS,
+ WM_FILESEL_SHOW_PROPS | WM_FILESEL_DIRECTORY,
FILE_DEFAULTDISPLAY,
FILE_SORT_ALPHA);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
@@ -1047,7 +1039,7 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot)
FILE_SPECIAL,
FILE_OPENFILE,
WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH | WM_FILESEL_FILES |
- WM_FILESEL_SHOW_PROPS,
+ WM_FILESEL_SHOW_PROPS | WM_FILESEL_DIRECTORY,
FILE_DEFAULTDISPLAY,
FILE_SORT_ALPHA);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME | SEQPROP_ENDFRAME);