diff options
author | Andrea Weikert <elubie@gmx.net> | 2009-09-12 23:54:39 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2009-09-12 23:54:39 +0400 |
commit | 9a25d22326060395b09cd6d81d7b4ac080bafb8f (patch) | |
tree | eb9ef68ff4b155f69d3d8beedc221b72d92ea83c /source/blender/editors/sound | |
parent | c1e2e3fea2dd1b22cf22a9dca4d88bde2d280ab6 (diff) |
2.5 filebrowser
Appending and Linking
* Linking Operator, invokes filebrowser for Append/Link
* Separated the append/link function into three parts:
** BLO_library_append_begin finds main for appending
** BLO_library_append_named_part appends one Object,Group, Material, ...
** BLO_library_append_end actually reads and expands the libraries
NOTE 1:
I also changed the returned properties for the filebrowser operators to the following convention:
"path" - the full path to a file or directory, means what is in directory + filename buttons in filebrowser
"directory" - the content of the directory button in filebrowser
"filename" - the content of the filename button in filebrowser
Usually only path should be required, but in some cases it might be more convenient to retrieve the parts separately.
Ton, Brecht: If you have time to take a look, let me know if anything needs to be fixed.
Diffstat (limited to 'source/blender/editors/sound')
-rw-r--r-- | source/blender/editors/sound/sound_ops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 303ca0eaefd..1121a3bcbcd 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -66,13 +66,13 @@ static int open_exec(bContext *C, wmOperator *op) { - char filename[FILE_MAX]; + char path[FILE_MAX]; bSound *sound; AUD_SoundInfo info; - RNA_string_get(op->ptr, "filename", filename); + RNA_string_get(op->ptr, "path", path); - sound = sound_new_file(CTX_data_main(C), filename); + sound = sound_new_file(CTX_data_main(C), path); if (sound==NULL || sound->handle == NULL) { BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); @@ -114,7 +114,7 @@ void SOUND_OT_open(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE); + WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL); RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory."); } |