From 634b750cbbeab549c0b083a382e694c9412ea491 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 17 Mar 2010 21:38:53 +0000 Subject: [PATCH] Sound bugfixes: * sound file path was not displayed in sequencer panel. * sound strip with relative paths would stop working after undo. (commit 27575 by Brecht from render25 branch) --- release/scripts/ui/space_sequencer.py | 2 +- source/blender/blenloader/intern/readblenentry.c | 2 +- source/blender/blenloader/intern/readfile.c | 4 ++-- source/blender/blenloader/intern/readfile.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/release/scripts/ui/space_sequencer.py b/release/scripts/ui/space_sequencer.py index 6398344e2f7..9d7ac872c75 100644 --- a/release/scripts/ui/space_sequencer.py +++ b/release/scripts/ui/space_sequencer.py @@ -609,7 +609,7 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel): layout.template_ID(strip, "sound", open="sound.open") layout.separator() - layout.prop(strip.sound, "filepath", text="") + layout.prop(strip, "filepath", text="") row = layout.row() if strip.sound.packed_file: diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index 083b57cf2b6..013544acffb 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -377,7 +377,7 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filename, MemFil /* makes lookup of existing images in old main */ blo_make_image_pointer_map(fd, oldmain); - bfd= blo_read_file_internal(fd, ""); + bfd= blo_read_file_internal(fd, filename); /* ensures relinked images are not freed */ blo_end_image_pointer_map(fd, oldmain); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 3fe6a6f9914..cc8686c89ba 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10736,7 +10736,7 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead) return bhead; } -BlendFileData *blo_read_file_internal(FileData *fd, char *file) +BlendFileData *blo_read_file_internal(FileData *fd, const char *filename) { BHead *bhead= blo_firstbhead(fd); BlendFileData *bfd; @@ -10748,7 +10748,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, char *file) bfd->main->versionfile= fd->fileversion; bfd->type= BLENFILETYPE_BLEND; - strncpy(bfd->main->name, file, sizeof(bfd->main->name)-1); + strncpy(bfd->main->name, filename, sizeof(bfd->main->name)-1); while(bhead) { switch(bhead->code) { diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h index cc3643c0364..8e391fa438e 100644 --- a/source/blender/blenloader/intern/readfile.h +++ b/source/blender/blenloader/intern/readfile.h @@ -108,7 +108,7 @@ struct Main; void blo_join_main(ListBase *mainlist); void blo_split_main(ListBase *mainlist, struct Main *main); -BlendFileData *blo_read_file_internal(FileData *fd, char *file); +BlendFileData *blo_read_file_internal(FileData *fd, const char *filename); FileData *blo_openblenderfile(char *name, struct ReportList *reports); FileData *blo_openblendermemory(void *buffer, int buffersize, struct ReportList *reports);