diff options
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 834961bf6e7..f6210d3a516 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1653,10 +1653,7 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame) BLI_stringdec(name, head, tail, &numlen); BLI_stringenc(name, head, tail, numlen, frame); - if(ima->id.lib) - BLI_path_abs(name, ima->id.lib->filepath); - else - BLI_path_abs(name, G.main->name); + BLI_path_abs(name, ID_BLEND_PATH(G.main, &ima->id)); flag= IB_rect|IB_multilayer; if(ima->flag & IMA_DO_PREMUL) @@ -1768,11 +1765,8 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame) char str[FILE_MAX]; BLI_strncpy(str, ima->name, FILE_MAX); - if(ima->id.lib) - BLI_path_abs(str, ima->id.lib->filepath); - else - BLI_path_abs(str, G.main->name); - + BLI_path_abs(str, ID_BLEND_PATH(G.main, &ima->id)); + /* FIXME: make several stream accessible in image editor, too*/ ima->anim = openanim(str, IB_rect, 0); @@ -1834,10 +1828,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra) /* get the right string */ BLI_strncpy(str, ima->name, sizeof(str)); - if(ima->id.lib) - BLI_path_abs(str, ima->id.lib->filepath); - else - BLI_path_abs(str, G.main->name); + BLI_path_abs(str, ID_BLEND_PATH(G.main, &ima->id)); /* read ibuf */ ibuf = IMB_loadiffname(str, flag); |