Precision Drawing Tools: replace deprecated bgl module

Part of T80730
This commit is contained in:
Germano Cavalcante 2022-07-28 12:19:44 -03:00
parent ce8c5f8d1b
commit c1cdc33579
Notes: blender-bot 2024-02-26 14:24:26 +01:00
Referenced by issue #80730, BGL deprecation
2 changed files with 2 additions and 3 deletions

View File

@ -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",

View File

@ -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)