[Bf-extensions-cvs] [c1cdc335] master: Precision Drawing Tools: replace deprecated bgl module

Germano Cavalcante noreply at git.blender.org
Thu Jul 28 17:34:44 CEST 2022


Commit: c1cdc33579fe55af354d702abcd077ddd31d8d9e
Author: Germano Cavalcante
Date:   Thu Jul 28 12:19:44 2022 -0300
Branches: master
https://developer.blender.org/rBAc1cdc33579fe55af354d702abcd077ddd31d8d9e

Precision Drawing Tools: replace deprecated bgl module

Part of T80730

===================================================================

M	precision_drawing_tools/__init__.py
M	precision_drawing_tools/pdt_functions.py

===================================================================

diff --git a/precision_drawing_tools/__init__.py b/precision_drawing_tools/__init__.py
index 6cb9ab52..6fdb72f2 100644
--- a/precision_drawing_tools/__init__.py
+++ b/precision_drawing_tools/__init__.py
@@ -12,7 +12,7 @@
 bl_info = {
     "name": "Precision Drawing Tools (PDT)",
     "author": "Alan Odom (Clockmender), Rune Morling (ermo)",
-    "version": (1, 5, 2),
+    "version": (1, 5, 3),
     "blender": (3, 0, 0),
     "location": "View3D > UI > PDT",
     "description": "Precision Drawing Tools for Accurate Modelling",
diff --git a/precision_drawing_tools/pdt_functions.py b/precision_drawing_tools/pdt_functions.py
index 66bf1de2..9352b66f 100644
--- a/precision_drawing_tools/pdt_functions.py
+++ b/precision_drawing_tools/pdt_functions.py
@@ -8,7 +8,6 @@
 
 import bpy
 import bmesh
-import bgl
 import gpu
 import numpy as np
 from mathutils import Vector, Quaternion
@@ -584,7 +583,7 @@ def draw_3d(coords, gtype, rgba, context):
 
     try:
         if coords is not None:
-            bgl.glEnable(bgl.GL_BLEND)
+            gpu.state.blend_set('ALPHA')
             SHADER.bind()
             SHADER.uniform_float("color", rgba)
             batch.draw(SHADER)



More information about the Bf-extensions-cvs mailing list