From 870115be85c196183bd81b9d111a4aafc7900df3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 20 Apr 2010 10:36:00 +0000 Subject: hidden durian feature for entering a new path when linked libs are not found. --- source/blender/blenloader/intern/readfile.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 66111d21ccb..99891fb62e2 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -12199,6 +12199,28 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) BKE_reportf(basefd->reports, RPT_INFO, "read library: '%s', '%s'\n", mainptr->curlib->filename, mainptr->curlib->name); fd= blo_openblenderfile(mainptr->curlib->filename, basefd->reports); + + /* allow typing in a new lib path */ + if(G.rt==-666) { + while(fd==NULL) { + char newlib_path[240] = { 0 }; + printf("Missing library: '%s', '%s'\n", mainptr->name, G.sce); + printf(" abs: %s\n", mainptr->curlib->filename); + printf(" rel: %s\n", mainptr->curlib->name); + printf(" enter a new path:\n"); + scanf("%s", newlib_path); + + strcpy(mainptr->curlib->name, newlib_path); + strcpy(mainptr->curlib->filename, newlib_path); + cleanup_path(G.sce, mainptr->curlib->filename); + + fd= blo_openblenderfile(mainptr->curlib->filename, basefd->reports); + + if(fd) { + printf("found: '%s', party on macuno!\n"); + } + } + } if (fd) { fd->reports= basefd->reports; -- cgit v1.2.3