From 4596f0ee5ea4139ccf3df787df503940a0f8fef2 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 16 Sep 2009 18:07:49 +0000 Subject: File Browser * Fix warning for non-existing "relative_paths" property. * Fix problem where the image browser would keep trying to load images it failed opening. --- source/blender/editors/space_file/file_ops.c | 7 ++++--- source/blender/editors/space_file/filelist.c | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 0e0ad88906e..faca6db75bf 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -531,9 +531,10 @@ int file_exec(bContext *C, wmOperator *unused) RNA_string_set(op->ptr, "directory", name); strcat(name, sfile->params->file); - if ( RNA_boolean_get(op->ptr, "relative_paths") ) { - BLI_makestringcode(G.sce, name); - } + if(RNA_struct_find_property(op->ptr, "relative_paths")) + if(RNA_boolean_get(op->ptr, "relative_paths")) + BLI_makestringcode(G.sce, name); + RNA_string_set(op->ptr, "path", name); /* some ops have multiple files to select */ diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index c0b16e639c0..582a5997ef5 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -592,10 +592,12 @@ void filelist_loadimage_timer(struct FileList* filelist) } if (limg->done) { FileImage *oimg = limg; - BLI_remlink(&filelist->loadimages, oimg); BLI_remove_thread(&filelist->threads, oimg); + /* brecht: keep failed images in the list, otherwise + it keeps trying to load them over and over? + BLI_remlink(&filelist->loadimages, oimg); + MEM_freeN(oimg);*/ limg = oimg->next; - MEM_freeN(oimg); refresh = 1; } else { limg= limg->next; -- cgit v1.2.3