diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-17 14:07:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-17 14:07:29 +0400 |
commit | c406ce29742fd44995f29768e593f00a7805df2c (patch) | |
tree | 4aafd126307728211582c076c435a50233e1fa48 /source/blender | |
parent | dfa075b66246f845a933611e768c638fb8c10bf5 (diff) |
minor improvement - entering "//somepath" in the file selector didnt expand from the current blend files path.
also quiet warning.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer_api.c | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ae691f07c7d..7078446801b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8995,7 +8995,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) /* printf and reports for now... its important users know this */ BKE_reportf_wrap(basefd->reports, RPT_INFO, - "read library: '%s', '%s'\n", + "read library: '%s', '%s'", mainptr->curlib->filepath, mainptr->curlib->name); fd= blo_openblenderfile(mainptr->curlib->filepath, basefd->reports); diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index f340c53f528..3ff9c3c0520 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1099,7 +1099,11 @@ static void file_expand_directory(bContext *C) SpaceFile *sfile= CTX_wm_space_file(C); if (sfile->params) { - if ( sfile->params->dir[0] == '~' ) { + /* TODO, what about // when relbase isn't valid? */ + if (G.relbase_valid && strncmp(sfile->params->dir, "//", 2) == 0) { + BLI_path_abs(sfile->params->dir, G.main->name); + } + else if (sfile->params->dir[0] == '~') { char tmpstr[sizeof(sfile->params->dir)-1]; BLI_strncpy(tmpstr, sfile->params->dir+1, sizeof(tmpstr)); BLI_join_dirfile(sfile->params->dir, sizeof(sfile->params->dir), BLI_getDefaultDocumentFolder(), tmpstr); diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 41c6f046c04..748c66499d8 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -202,7 +202,7 @@ static Sequence *rna_Sequences_new_sound(ID *id, Editing *ed, Main *bmain, Repor seq = alloc_generic_sequence(ed, name, start_frame, channel, SEQ_SOUND, sound->name); seq->sound = sound; - seq->len = ceil(sound_get_length(sound) * FPS); + seq->len = ceil((double)sound_get_length(sound) * FPS); seq->scene_sound = sound_add_scene_sound(scene, seq, start_frame, start_frame + seq->len, 0); |