diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-02-10 15:30:07 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-02-10 15:30:07 +0300 |
commit | d9eeb7840f52d9fdbb6c4a5d3f1f2b2944fbcc6e (patch) | |
tree | f108908a848ae7fdfdfa74d5edf31887296b11e4 /source | |
parent | 4c883fd04e7d2c23645bf6fcf4ce521961a3e836 (diff) | |
parent | 97cc130f472fa2e5e12ae07312abae2de7d409aa (diff) |
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'source')
6 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_view3d_offscreen.h b/source/blender/editors/include/ED_view3d_offscreen.h index e854982c796..c490e96031f 100644 --- a/source/blender/editors/include/ED_view3d_offscreen.h +++ b/source/blender/editors/include/ED_view3d_offscreen.h @@ -54,6 +54,7 @@ void ED_view3d_draw_offscreen(struct Depsgraph *depsgraph, bool draw_background, const char *viewname, const bool do_color_management, + const bool restore_rv3d_mats, struct GPUOffScreen *ofs, struct GPUViewport *viewport); void ED_view3d_draw_offscreen_simple(struct Depsgraph *depsgraph, @@ -84,6 +85,7 @@ struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Depsgraph *depsgraph, eImBufFlags imbuf_flag, int alpha_mode, const char *viewname, + const bool restore_rv3d_mats, struct GPUOffScreen *ofs, char err_out[256]); struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(struct Depsgraph *depsgraph, diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 5ae952738c9..71e4dca3ab1 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -381,6 +381,7 @@ static void screen_opengl_render_doit(const bContext *C, OGLRender *oglrender, R imbuf_flags, alpha_mode, viewname, + true, oglrender->ofs, err_out); diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 7c13355c618..f7c0f7718bb 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -6250,6 +6250,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op) IB_rect, R_ALPHAPREMUL, NULL, + false, NULL, err_out); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index aa4922372c8..478f48700ea 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1676,6 +1676,7 @@ void ED_view3d_draw_offscreen(Depsgraph *depsgraph, bool draw_background, const char *viewname, const bool do_color_management, + const bool restore_rv3d_mats, GPUOffScreen *ofs, GPUViewport *viewport) { @@ -1764,7 +1765,11 @@ void ED_view3d_draw_offscreen(Depsgraph *depsgraph, region->winy = orig.region_winy; region->winrct = orig.region_winrct; - ED_view3d_mats_rv3d_restore(region->regiondata, orig.rv3d_mats); + /* Optionally do _not_ restore rv3d matrices (e.g. they are used/stored in the ImBuff for + * reprojection, see texture_paint_image_from_view_exec(). */ + if (restore_rv3d_mats) { + ED_view3d_mats_rv3d_restore(region->regiondata, orig.rv3d_mats); + } MEM_freeN(orig.rv3d_mats); UI_Theme_Restore(&orig.theme_state); @@ -1856,6 +1861,7 @@ void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph, draw_background, viewname, do_color_management, + true, ofs, viewport); } @@ -1876,6 +1882,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph, eImBufFlags imbuf_flag, int alpha_mode, const char *viewname, + const bool restore_rv3d_mats, /* output vars */ GPUOffScreen *ofs, char err_out[256]) @@ -1983,6 +1990,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph, draw_sky, viewname, do_color_management, + restore_rv3d_mats, ofs, NULL); @@ -2108,6 +2116,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph, imbuf_flag, alpha_mode, viewname, + true, ofs, err_out); } diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c index 51038aae598..8d2df826722 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.c +++ b/source/blender/python/gpu/gpu_py_offscreen.c @@ -268,6 +268,7 @@ static PyObject *py_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *args, true, "", false, + true, self->ofs, NULL); diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 7680a786634..42d17387d77 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1363,6 +1363,7 @@ static ImBuf *blend_file_thumb(const bContext *C, IB_rect, R_ALPHAPREMUL, NULL, + true, NULL, err_out); } |