diff options
author | Ton Roosendaal <ton@blender.org> | 2006-02-02 21:28:01 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-02-02 21:28:01 +0300 |
commit | 2a528b285e29382f2447701058525dc5299525ed (patch) | |
tree | 0852e7c4f10a50e705e75db4602497f89a904c16 /source | |
parent | f493e8ed2e6af6d1ed4d37906ce445b914374f63 (diff) |
If Images have relative path, and come from a library, it uses the library
path as reference for loading the image.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index b37e787729e..addb4378ce9 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -491,6 +491,8 @@ void load_image(Image * ima, int flags, char *relabase, int framenum) { char name[FILE_MAXDIR + FILE_MAXFILE]; + if(ima->id.lib) relabase= ima->id.lib->filename; + if (ima->ibuf == NULL) { // is there a PackedFile with this image ?; @@ -578,7 +580,10 @@ void ima_ibuf_is_nul(Tex *tex, Image *ima) if(ima==0) return; strcpy(str, ima->name); - BLI_convertstringcode(str, G.sce, G.scene->r.cfra); + if(ima->id.lib) + BLI_convertstringcode(str, ima->id.lib->filename, G.scene->r.cfra); + else + BLI_convertstringcode(str, G.sce, G.scene->r.cfra); if(tex->imaflag & TEX_STD_FIELD) de_interlacefunc= de_interlace_st; else de_interlacefunc= de_interlace_ng; |