Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'measureit/measureit_main.py')
-rw-r--r--measureit/measureit_main.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/measureit/measureit_main.py b/measureit/measureit_main.py
index 23e9de46..d69ba268 100644
--- a/measureit/measureit_main.py
+++ b/measureit/measureit_main.py
@@ -11,7 +11,6 @@ import bpy
import bmesh
from bmesh import from_edit_mesh
# noinspection PyUnresolvedReferences
-import bgl
from bpy.types import PropertyGroup, Panel, Object, Operator, SpaceView3D
from bpy.props import IntProperty, CollectionProperty, FloatVectorProperty, BoolProperty, StringProperty, \
FloatProperty, EnumProperty
@@ -1933,8 +1932,8 @@ def draw_main(context):
else:
objlist = context.view_layer.objects
- # Enable GL drawing
- bgl.glEnable(bgl.GL_BLEND)
+ # Enable drawing
+ gpu.state.blend_set('ALPHA')
# ---------------------------------------
# Generate all OpenGL calls for measures
# ---------------------------------------
@@ -1964,9 +1963,9 @@ def draw_main(context):
draw_faces(context, myobj, region, rv3d)
# -----------------------
- # restore opengl defaults
+ # restore defaults
# -----------------------
- bgl.glDisable(bgl.GL_BLEND)
+ gpu.state.blend_set('NONE')
# -------------------------------------------------------------