forked from bartvdbraak/blender
Fix #35624: rendering to a new window, then switching scene in the main window,
would still continue to render the previous scene in the render window on F12.
This commit is contained in:
parent
3fe117bd3d
commit
601e5ad2f4
@ -525,6 +525,7 @@ void WM_window_open_temp(bContext *C, rcti *position, int type)
|
|||||||
{
|
{
|
||||||
wmWindow *win;
|
wmWindow *win;
|
||||||
ScrArea *sa;
|
ScrArea *sa;
|
||||||
|
Scene *scene = CTX_data_scene(C);
|
||||||
|
|
||||||
/* changes rect to fit within desktop */
|
/* changes rect to fit within desktop */
|
||||||
wm_window_check_position(position);
|
wm_window_check_position(position);
|
||||||
@ -550,9 +551,16 @@ void WM_window_open_temp(bContext *C, rcti *position, int type)
|
|||||||
wm_window_raise(win);
|
wm_window_raise(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add new screen? */
|
if (win->screen == NULL) {
|
||||||
if (win->screen == NULL)
|
/* add new screen */
|
||||||
win->screen = ED_screen_add(win, CTX_data_scene(C), "temp");
|
win->screen = ED_screen_add(win, scene, "temp");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* switch scene for rendering */
|
||||||
|
if (win->screen->scene != scene)
|
||||||
|
ED_screen_set_scene(C, win->screen, scene);
|
||||||
|
}
|
||||||
|
|
||||||
win->screen->temp = 1;
|
win->screen->temp = 1;
|
||||||
|
|
||||||
/* make window active, and validate/resize */
|
/* make window active, and validate/resize */
|
||||||
|
Loading…
Reference in New Issue
Block a user