[Bf-extensions-cvs] [7e86118] master: Storypencil: Remove BGL module

Antonio Vazquez noreply at git.blender.org
Mon Sep 19 15:59:24 CEST 2022


Commit: 7e86118607df4ffdb87f1726031302916a1fee9e
Author: Antonio Vazquez
Date:   Mon Sep 19 15:59:18 2022 +0200
Branches: master
https://developer.blender.org/rBAC7e86118607df4ffdb87f1726031302916a1fee9e

Storypencil: Remove BGL module

This was deprecated

Also, fixed version number

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

M	storypencil/__init__.py
M	storypencil/dopesheet_overlay.py

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

diff --git a/storypencil/__init__.py b/storypencil/__init__.py
index 86b93b1..4cf4616 100644
--- a/storypencil/__init__.py
+++ b/storypencil/__init__.py
@@ -7,7 +7,7 @@ bl_info = {
     "name": "Storypencil - Storyboard Tools",
     "description": "Storyboard tools",
     "author": "Antonio Vazquez, Matias Mendiola, Daniel Martinez Lara, Rodrigo Blaas",
-    "version": (0, 1, 1),
+    "version": (1, 1, 0),
     "blender": (3, 3, 0),
     "location": "",
     "warning": "",
diff --git a/storypencil/dopesheet_overlay.py b/storypencil/dopesheet_overlay.py
index 63f3cf3..754b8e5 100644
--- a/storypencil/dopesheet_overlay.py
+++ b/storypencil/dopesheet_overlay.py
@@ -3,7 +3,6 @@
 import typing
 
 import bpy
-import bgl
 import gpu
 from gpu_extras.batch import batch_for_shader
 
@@ -38,7 +37,7 @@ class LineDrawer:
         if not coords:
             return
 
-        bgl.glEnable(bgl.GL_BLEND)
+        gpu.state.blend_set('ALPHA')
 
         self.shader.uniform_float("color", color)
 
@@ -46,7 +45,7 @@ class LineDrawer:
         batch.program_set(self.shader)
         batch.draw()
 
-        bgl.glDisable(bgl.GL_BLEND)
+        gpu.state.blend_set('NONE')
 
 
 def get_scene_strip_in_out(strip):



More information about the Bf-extensions-cvs mailing list