From 091ee2833b094eac781fb2c687332d4d5c328cb5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 3 Nov 2024 19:28:00 +1100 Subject: [PATCH] PyDoc: replace references to the deprecated "bgl" with "gpu" Also correct bullet-points in gpu.state.blend_set. --- doc/python_api/examples/blf.py | 2 +- scripts/modules/gpu_extras/presets.py | 3 ++- source/blender/python/gpu/gpu_py_state.cc | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/python_api/examples/blf.py b/doc/python_api/examples/blf.py index abcad480aed..50b67f5efaa 100644 --- a/doc/python_api/examples/blf.py +++ b/doc/python_api/examples/blf.py @@ -3,7 +3,7 @@ Hello World Text Example ++++++++++++++++++++++++ Example of using the blf module. For this module to work we -need to use the OpenGL wrapper :class:`~bgl` as well. +need to use the GPU module :mod:`gpu` as well. """ # import stand alone modules import blf diff --git a/scripts/modules/gpu_extras/presets.py b/scripts/modules/gpu_extras/presets.py index ca256a98e7a..4d55840e13c 100644 --- a/scripts/modules/gpu_extras/presets.py +++ b/scripts/modules/gpu_extras/presets.py @@ -8,7 +8,8 @@ def draw_circle_2d(position, color, radius, *, segments=None): :arg position: 2D position where the circle will be drawn. :type position: Sequence[float] - :arg color: Color of the circle (RGBA). To use transparency GL_BLEND has to be enabled. + :arg color: Color of the circle (RGBA). + To use transparency blend must be set to ``ALPHA``, see: :func:`gpu.state.blend_set`. :type color: Sequence[float] :arg radius: Radius of the circle. :type radius: float diff --git a/source/blender/python/gpu/gpu_py_state.cc b/source/blender/python/gpu/gpu_py_state.cc index 47861bafa62..3e5d33de673 100644 --- a/source/blender/python/gpu/gpu_py_state.cc +++ b/source/blender/python/gpu/gpu_py_state.cc @@ -77,6 +77,7 @@ PyDoc_STRVAR( " Defines the fixed pipeline blending equation.\n" "\n" " :arg mode: The type of blend mode.\n" + "\n" " * ``NONE`` No blending.\n" " * ``ALPHA`` The original color channels are interpolated according to the alpha " "value.\n"