diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-10-23 09:06:42 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-10-23 09:06:42 +0300 |
commit | 48f4e1a63f2c2a858d05feabcf215f6d017722d0 (patch) | |
tree | 0a6942b19fbbe5d076b9534e0981c4ca31e5548d /source/blender/blenkernel/intern/image.c | |
parent | b2f8da1c53ff91ad83266a780f95abece8a0ffb9 (diff) |
Fix for error w/ RenderView in ImageView list
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index be7c617f164..8f8ce6eeebc 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -2864,11 +2864,22 @@ bool BKE_image_is_stereo(Image *ima) BLI_findstring(&ima->views, STEREO_RIGHT_NAME, offsetof(ImageView, name))); } +static void image_view_from_render_view(ImageView *iv_dst, RenderView *rv_src) +{ + BLI_strncpy(iv_dst->name, rv_src->name, sizeof(iv_dst->name)); +} + static void image_init_multilayer_multiview(Image *ima, RenderResult *rr) { BKE_image_free_views(ima); if (rr) { - BLI_duplicatelist(&ima->views, &rr->views); + RenderView *rv_src; + for (rv_src = rr->views.first; rv_src; rv_src = rv_src->next) { + ImageView *iv_dst; + iv_dst = MEM_callocN(sizeof(ImageView), "Viewer Image View"); + image_view_from_render_view(iv_dst, rv_src); + BLI_addhead(&ima->views, iv_dst); + } } } |