Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/render/render_internal.c
| Show First 20 Lines • Show All 545 Lines • ▼ Show 20 Lines | static void render_image_update_pass_and_layer(RenderJob *rj, RenderResult *rr, ImageUser *iuser) | ||||
| ScrArea *first_area = NULL, *matched_area = NULL; | ScrArea *first_area = NULL, *matched_area = NULL; | ||||
| /* image window, compo node users */ | /* image window, compo node users */ | ||||
| for (wm = rj->main->wm.first; wm && matched_area == NULL; wm = wm->id.next) { /* only 1 wm */ | for (wm = rj->main->wm.first; wm && matched_area == NULL; wm = wm->id.next) { /* only 1 wm */ | ||||
| wmWindow *win; | wmWindow *win; | ||||
| for (win = wm->windows.first; win && matched_area == NULL; win = win->next) { | for (win = wm->windows.first; win && matched_area == NULL; win = win->next) { | ||||
| const bScreen *screen = WM_window_get_active_screen(win); | const bScreen *screen = WM_window_get_active_screen(win); | ||||
| for (ScrArea *area = screen->areabase.first; area; area = area->next) { | LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | ||||
| if (area->spacetype == SPACE_IMAGE) { | if (area->spacetype == SPACE_IMAGE) { | ||||
| SpaceImage *sima = area->spacedata.first; | SpaceImage *sima = area->spacedata.first; | ||||
| // area->spacedata might be empty when toggling fullscreen mode. | // area->spacedata might be empty when toggling fullscreen mode. | ||||
| if (sima != NULL && sima->image == rj->image) { | if (sima != NULL && sima->image == rj->image) { | ||||
| if (first_area == NULL) { | if (first_area == NULL) { | ||||
| first_area = area; | first_area = area; | ||||
| } | } | ||||
| if (area == rj->area) { | if (area == rj->area) { | ||||
| ▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | static void render_image_restore_layer(RenderJob *rj) | ||||
| wmWindowManager *wm; | wmWindowManager *wm; | ||||
| /* image window, compo node users */ | /* image window, compo node users */ | ||||
| for (wm = rj->main->wm.first; wm; wm = wm->id.next) { /* only 1 wm */ | for (wm = rj->main->wm.first; wm; wm = wm->id.next) { /* only 1 wm */ | ||||
| wmWindow *win; | wmWindow *win; | ||||
| for (win = wm->windows.first; win; win = win->next) { | for (win = wm->windows.first; win; win = win->next) { | ||||
| const bScreen *screen = WM_window_get_active_screen(win); | const bScreen *screen = WM_window_get_active_screen(win); | ||||
| for (ScrArea *area = screen->areabase.first; area; area = area->next) { | LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | ||||
| if (area == rj->area) { | if (area == rj->area) { | ||||
| if (area->spacetype == SPACE_IMAGE) { | if (area->spacetype == SPACE_IMAGE) { | ||||
| SpaceImage *sima = area->spacedata.first; | SpaceImage *sima = area->spacedata.first; | ||||
| if (RE_HasSingleLayer(rj->re)) { | if (RE_HasSingleLayer(rj->re)) { | ||||
| /* For single layer renders keep the active layer | /* For single layer renders keep the active layer | ||||
| * visible, or show the compositing result. */ | * visible, or show the compositing result. */ | ||||
| RenderResult *rr = RE_AcquireResultRead(rj->re); | RenderResult *rr = RE_AcquireResultRead(rj->re); | ||||
| ▲ Show 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | static void clean_viewport_memory(Main *bmain, Scene *scene) | ||||
| Scene *sce_iter; | Scene *sce_iter; | ||||
| Base *base; | Base *base; | ||||
| /* Tag all the available objects. */ | /* Tag all the available objects. */ | ||||
| BKE_main_id_tag_listbase(&bmain->objects, LIB_TAG_DOIT, true); | BKE_main_id_tag_listbase(&bmain->objects, LIB_TAG_DOIT, true); | ||||
| /* Go over all the visible objects. */ | /* Go over all the visible objects. */ | ||||
| for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) { | for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) { | ||||
| for (wmWindow *win = wm->windows.first; win; win = win->next) { | LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { | ||||
| ViewLayer *view_layer = WM_window_get_active_view_layer(win); | ViewLayer *view_layer = WM_window_get_active_view_layer(win); | ||||
| for (base = view_layer->object_bases.first; base; base = base->next) { | for (base = view_layer->object_bases.first; base; base = base->next) { | ||||
| clean_viewport_memory_base(base); | clean_viewport_memory_base(base); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 310 Lines • Show Last 20 Lines | |||||