diff options
author | Ton Roosendaal <ton@blender.org> | 2004-04-22 23:58:54 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-04-22 23:58:54 +0400 |
commit | 438331af8e4679a0dcd3c32b95a71861c38b75c1 (patch) | |
tree | 53e9ac2b8fee78e20165bd5d1200fdb22c4f85f4 /source/blender/src/filesel.c | |
parent | 66578d290002950bec57310b9967ceee3dc502a6 (diff) |
Nasty Library linking and appending stuff!
Problem: when appending data, it called the local_all() function, which
indeed made all data local, including all other dynamic linked data.
Not very nice... but mixing dynamic & appending data from single file is
headcrunching code.
Solution: when appending data, it now only makes local_all() the data from
that specific library file, leaving dynamic data from other files linked.
(Bug report 1183)
Diffstat (limited to 'source/blender/src/filesel.c')
-rw-r--r-- | source/blender/src/filesel.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index 0bc79c84ef7..88b7f793c2c 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -2231,6 +2231,7 @@ static int is_a_library(SpaceFile *sfile, char *dir, char *group) static void do_library_append(SpaceFile *sfile) { + Library *lib; char dir[FILE_MAXDIR], group[32]; if ( is_a_library(sfile, dir, group)==0 ) { @@ -2269,7 +2270,14 @@ static void do_library_append(SpaceFile *sfile) /* in sfile->dir is the whole lib name */ strcpy(G.lib, sfile->dir); - if((sfile->flag & FILE_LINK)==0) all_local(); + /* and now find the latest append lib file */ + lib= G.main->library.first; + while(lib) { + if (BLI_streq(dir, lib->name)) break; + lib= lib->id.next; + } + + if((sfile->flag & FILE_LINK)==0) all_local(lib); } } |