diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-26 13:40:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-26 14:02:40 +0300 |
commit | ef96f36ee961e7f11556570da2b9cef0a08159f9 (patch) | |
tree | 2a6943daee3d11baa7f3a92a58eff72d48ea3609 /source/blender/blenkernel/intern/image.c | |
parent | 654ee398ff0e37f4d5f5c4df96b1d521e4796de4 (diff) |
Move background images into the camera
This moves background images out of the 3D viewport,
to be used only as camera reference images.
For 3D viewport references,
background images can be used, see: D2827
Some work is still needed
(background option isn't working at the moment).
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 33a690b32c6..99f8d6a64c1 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -2563,20 +2563,19 @@ void BKE_image_walk_all_users(const Main *mainp, void *customdata, } } + for (Camera *cam = mainp->camera.first; cam; cam = cam->id.next) { + for (CameraBGImage *bgpic = cam->bg_images.first; bgpic; bgpic = bgpic->next) { + callback(bgpic->ima, &bgpic->iuser, customdata); + } + } + /* image window, compo node users */ for (wm = mainp->wm.first; wm; wm = wm->id.next) { /* only 1 wm */ for (win = wm->windows.first; win; win = win->next) { const bScreen *screen = BKE_workspace_active_screen_get(win->workspace_hook); for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - if (sa->spacetype == SPACE_VIEW3D) { - View3D *v3d = sa->spacedata.first; - BGpic *bgpic; - for (bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next) { - callback(bgpic->ima, &bgpic->iuser, customdata); - } - } - else if (sa->spacetype == SPACE_IMAGE) { + if (sa->spacetype == SPACE_IMAGE) { SpaceImage *sima = sa->spacedata.first; callback(sima->image, &sima->iuser, customdata); } |