diff options
author | Germano Cavalcante <mano-wii> | 2021-05-01 17:59:54 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-05-01 18:12:58 +0300 |
commit | 6fff2427d623119a373e7991a319a75d65ed387e (patch) | |
tree | edaed5b12eb0986d53a08f84b54a2945f484b6f8 /release/scripts/modules | |
parent | 6111ec8bd3296320c9d7ac15a40f25b15b997754 (diff) |
Python GPU: Replace a few calls of the bgl module with gpu
Concludes these files:
[x]bpy_types.py
[x]operator_modal_draw.py
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D11129
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 4ea8c88e8d9..aa540eeb23b 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -657,16 +657,14 @@ class Gizmo(StructRNA): use_blend = color[3] < 1.0 if use_blend: - # TODO: wrap GPU_blend from GPU state. - from bgl import glEnable, glDisable, GL_BLEND - glEnable(GL_BLEND) + gpu.state.blend_set('ALPHA') with gpu.matrix.push_pop(): gpu.matrix.multiply_matrix(matrix) batch.draw() if use_blend: - glDisable(GL_BLEND) + gpu.state.blend_set('NONE') @staticmethod def new_custom_shape(type, verts): |