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:
authorGermano Cavalcante <germano.costa@ig.com.br>2022-07-28 18:17:26 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-07-28 18:29:39 +0300
commitce8c5f8d1b180051d540fb162872300bd4598e31 (patch)
tree67b4f971192b4e43c6a17891910efd5febff14be
parentc8109966ce74ba9516d81f1bc98a64d00eeb0b67 (diff)
Power Sequencer: replace deprecated bgl module
Part of T80730
-rwxr-xr-xpower_sequencer/__init__.py2
-rw-r--r--power_sequencer/operators/mouse_trim_modal.py9
2 files changed, 5 insertions, 6 deletions
diff --git a/power_sequencer/__init__.py b/power_sequencer/__init__.py
index e8f920f7..877de302 100755
--- a/power_sequencer/__init__.py
+++ b/power_sequencer/__init__.py
@@ -24,7 +24,7 @@ bl_info = {
"name": "Power Sequencer",
"description": "Video editing tools for content creators",
"author": "Nathan Lovato",
- "version": (2, 0, 1),
+ "version": (2, 0, 2),
"blender": (2, 93, 3),
"location": "Sequencer",
"tracker_url": "https://github.com/GDquest/Blender-power-sequencer/issues",
diff --git a/power_sequencer/operators/mouse_trim_modal.py b/power_sequencer/operators/mouse_trim_modal.py
index 93ca1346..e8f751c9 100644
--- a/power_sequencer/operators/mouse_trim_modal.py
+++ b/power_sequencer/operators/mouse_trim_modal.py
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
-import bgl
import gpu
import math
from mathutils import Vector
@@ -358,8 +357,8 @@ def draw(self, context, frame_start=-1, frame_end=-1, target_strips=[], draw_arr
rect_origin = Vector((start_x, start_y))
rect_size = Vector((end_x - start_x, abs(start_y - end_y)))
- bgl.glEnable(bgl.GL_BLEND)
- bgl.glLineWidth(3)
+ gpu.state.blend_set('ALPHA')
+ gpu.state.line_width_set(3.0)
draw_rectangle(SHADER, rect_origin, rect_size, color_fill)
# Vertical lines
draw_line(SHADER, Vector((start_x, start_y)), Vector((start_x, end_y)), color_line)
@@ -374,8 +373,8 @@ def draw(self, context, frame_start=-1, frame_end=-1, target_strips=[], draw_arr
draw_triangle_equilateral(SHADER, center_1, radius, color=color_line)
draw_triangle_equilateral(SHADER, center_2, radius, math.pi, color=color_line)
- bgl.glLineWidth(1)
- bgl.glDisable(bgl.GL_BLEND)
+ gpu.state.line_width_set(1)
+ gpu.state.blend_set('NONE')
def get_frame_and_channel(event):