From c801c73d79cc38ee338f6392a72bdee66053aa43 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 6 Oct 2023 07:37:44 +0200 Subject: [PATCH] Python: Update BGL Deprecation Warning BGL is deprecated and will not work on Metal devices. Although the inital plan was to remove it in Blender 4.0, We don't see any harm to still have it in the code-base until OpenGL itself is deprecated. Add-on developers are warned when using the BGL module that the add-on/script will not work on all platforms. There are still some limitations inside the GPU module that needs a more friendly API. This API isn't clear at this time. Pull Request: https://projects.blender.org/blender/blender/pulls/112579 --- source/blender/python/generic/bgl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/python/generic/bgl.cc b/source/blender/python/generic/bgl.cc index 9b76b64878b..93af1549592 100644 --- a/source/blender/python/generic/bgl.cc +++ b/source/blender/python/generic/bgl.cc @@ -51,7 +51,7 @@ static void report_deprecated_call(const char *function_name) } char message[256]; SNPRINTF(message, - "'bgl.gl%s' is deprecated and will be removed in Blender 4.0. Report or update your " + "'bgl.gl%s' is deprecated and will not work on all platforms. Report or update your " "script to use 'gpu' module.", function_name); CLOG_WARN(&LOG, "%s", message); @@ -2675,7 +2675,7 @@ PyObject *BPyInit_bgl() if (GPU_backend_get_type() != GPU_BACKEND_OPENGL) { CLOG_WARN(&LOG, "'bgl' imported without an OpenGL backend. Please update your add-ons to use the " - "'gpu' module. In Blender 4.0 'bgl' will be removed."); + "'gpu' module."); } #endif