diff options
author | Joseph Eagar <joeedh@gmail.com> | 2010-09-04 09:31:25 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2010-09-04 09:31:25 +0400 |
commit | bb7339a7aec37bdb2ee8a21599e6c65b37ef1277 (patch) | |
tree | 6fb8da94c6e43098c606f768e722484b04b8645c /source/blender/editors/space_sequencer/space_sequencer.c | |
parent | 37f2c8a64c3277f100ab084ef1bb3846bc7b2c62 (diff) | |
parent | 8a320974f1b3e6004db3b3ad64f97742f878cbee (diff) |
merge with trunk at r31523
Diffstat (limited to 'source/blender/editors/space_sequencer/space_sequencer.c')
-rw-r--r-- | source/blender/editors/space_sequencer/space_sequencer.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 586b76268e4..4cf25ab9585 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -35,6 +35,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" +#include "BLI_path_util.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -322,7 +323,20 @@ static int sound_drop_poll(bContext *C, wmDrag *drag, wmEvent *event) static void sequencer_drop_copy(wmDrag *drag, wmDropBox *drop) { /* copy drag path to properties */ - RNA_string_set(drop->ptr, "filepath", drag->path); + if(RNA_struct_find_property(drop->ptr, "filepath")) + RNA_string_set(drop->ptr, "filepath", drag->path); + + if(RNA_struct_find_property(drop->ptr, "directory")) { + PointerRNA itemptr; + char dir[FILE_MAX], file[FILE_MAX]; + + BLI_split_dirfile(drag->path, dir, file); + + RNA_string_set(drop->ptr, "directory", dir); + + RNA_collection_add(drop->ptr, "files", &itemptr); + RNA_string_set(&itemptr, "name", file); + } } /* this region dropbox definition */ |