[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56011] trunk/blender/source/blender/ editors/render/render_view.c: Usability fix, own collection.
Ton Roosendaal
ton at blender.org
Sat Apr 13 17:14:35 CEST 2013
Revision: 56011
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56011
Author: ton
Date: 2013-04-13 15:14:34 +0000 (Sat, 13 Apr 2013)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/blender/editors/render/render_view.c
Modified: trunk/blender/source/blender/editors/render/render_view.c
===================================================================
--- trunk/blender/source/blender/editors/render/render_view.c 2013-04-13 14:57:08 UTC (rev 56010)
+++ trunk/blender/source/blender/editors/render/render_view.c 2013-04-13 15:14:34 UTC (rev 56011)
@@ -87,7 +87,7 @@
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 @@
/* 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 @@
}
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 @@
}
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) ||
More information about the Bf-blender-cvs
mailing list