Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2013-04-13 19:14:34 +0400
committerTon Roosendaal <ton@blender.org>2013-04-13 19:14:34 +0400
commita710434f563e439ac7a123cd9f1b109136b87a86 (patch)
treeea10fd70cc41a88f02760999702e9a91ea2a2359 /source/blender/editors/render
parent2baa59e36d4994a3dd58c254964a0caf5bc081a3 (diff)
Usability fix, own collection.
If you have two windows, each with different scene, the render output for a window would go to the other, if it was already drawing a render for the other scene. Now you can have renders draw correct in two windows for two scenes.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r--source/blender/editors/render/render_view.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c
index 186d0d20623..1103f956f78 100644
--- a/source/blender/editors/render/render_view.c
+++ b/source/blender/editors/render/render_view.c
@@ -87,7 +87,7 @@ static ScrArea *biggest_non_image_area(bContext *C)
return big;
}
-static ScrArea *find_area_showing_r_result(bContext *C, wmWindow **win)
+static ScrArea *find_area_showing_r_result(bContext *C, Scene *scene, wmWindow **win)
{
wmWindowManager *wm = CTX_wm_manager(C);
ScrArea *sa = NULL;
@@ -95,15 +95,17 @@ static ScrArea *find_area_showing_r_result(bContext *C, wmWindow **win)
/* find an imagewindow showing render result */
for (*win = wm->windows.first; *win; *win = (*win)->next) {
- for (sa = (*win)->screen->areabase.first; sa; sa = sa->next) {
- if (sa->spacetype == SPACE_IMAGE) {
- sima = sa->spacedata.first;
- if (sima->image && sima->image->type == IMA_TYPE_R_RESULT)
- break;
+ if ((*win)->screen->scene == scene) {
+ for (sa = (*win)->screen->areabase.first; sa; sa = sa->next) {
+ if (sa->spacetype == SPACE_IMAGE) {
+ sima = sa->spacedata.first;
+ if (sima->image && sima->image->type == IMA_TYPE_R_RESULT)
+ break;
+ }
}
+ if (sa)
+ break;
}
- if (sa)
- break;
}
return sa;
@@ -173,7 +175,7 @@ void render_view_open(bContext *C, int mx, int my)
}
if (!sa) {
- sa = find_area_showing_r_result(C, &win);
+ sa = find_area_showing_r_result(C, scene, &win);
if (sa == NULL)
sa = find_area_image_empty(C);
@@ -285,9 +287,9 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), const wm
}
else {
wmWindow *win, *winshow;
- ScrArea *sa = find_area_showing_r_result(C, &winshow);
+ ScrArea *sa = find_area_showing_r_result(C, CTX_data_scene(C), &winshow);
- /* is there another window showing result? */
+ /* is there another window on current scene showing result? */
for (win = CTX_wm_manager(C)->windows.first; win; win = win->next) {
bScreen *sc = win->screen;
if ((sc->temp && ((ScrArea *)sc->areabase.first)->spacetype == SPACE_IMAGE) ||