diff options
author | Ton Roosendaal <ton@blender.org> | 2005-10-25 22:22:34 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-10-25 22:22:34 +0400 |
commit | ce85adc780b8b2156dea8879f2b733ab8d7db2cc (patch) | |
tree | 64ece4ef60e64cbe7df46941c00b2b102d3bd6fd /source/blender/blenloader/intern/readfile.c | |
parent | dd38751a844b1f9d89a2d7525a540b16795d1672 (diff) |
Bugfix; appending with using relative paths made all dynamic links from
other libraries local.
Also added some securities in the temporal 'sync pose' testing code. It now
asks with a menu to confirm the object to be replaced too. Later more!
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d139af27d25..84ac4bae323 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5846,7 +5846,6 @@ void BLO_library_append(SpaceFile *sfile, char *dir, int idcode) BLI_strncpy(filename, G.sce, sizeof(filename)); BLI_strncpy(G.sce, fd->filename, sizeof(filename)); // already opened file, to reconstruct relative paths - if(sfile->flag & FILE_AUTOSELECT) scene_deselect_all(G.scene); fd->mainlist.first= fd->mainlist.last= G.main; @@ -5893,7 +5892,12 @@ void BLO_library_append(SpaceFile *sfile, char *dir, int idcode) sfile->libfiledata= 0; } - if(sfile->flag & FILE_STRINGCODE) BLI_makestringcode(filename, mainl->curlib->name); // uses old .blend file as reference + if(sfile->flag & FILE_STRINGCODE) { + /* uses old .blend file (*filename) as reference */ + BLI_makestringcode(filename, mainl->curlib->name); + /* the caller checks for appended library, so we make sure names match */ + BLI_strncpy(dir, mainl->curlib->name, sizeof(mainl->curlib->name)); + } if(sfile->flag & FILE_ATCURSOR) { centerbase= (G.scene->base.first); |