Python API: Expose background drawing as argument for gpu.types.GPUOffScreen.draw_view3d() #105748

Merged
Jeroen Bakker merged 3 commits from Yuntoko/blender:expose-draw-background-pyapi into main 2023-04-17 09:28:12 +02:00

3 Commits

Author SHA1 Message Date
Jeroen Bakker 92e2472edb Merge branch 'main' into expose-draw-background-pyapi
buildbot/vexp-code-patch-coordinator Build done. Details
2023-04-17 09:03:44 +02:00
Jeroen Bakker 19493b193c Merge branch 'main' into expose-draw-background-pyapi 2023-04-14 16:30:36 +02:00
Yuntoko d1438add40 Python API: Expose background drawing as argument for gpu.types.GPUOffScreen.draw_view3d()
buildbot/vexp-code-patch-coordinator Build done. Details
Currently, when using the python api for offscreen drawing, the default background will always be rendered into the GPUOffScreen's framebuffer, rendering the alpha channel essentially useless and making it difficult to separate objects from the background.

This patch allows offscreen drawing of a 3d view with transparent background by exposing an optional parameter to the python api, enabling, for example, compositing the result over another image.

The new parameter to draw_view3d() is optional, with the default value matching the previous behavior, so this change is fully backwards-compatible.
2023-03-14 00:52:13 +01:00