diff options
author | Peter Kim <pk15950@gmail.com> | 2022-09-08 07:00:43 +0300 |
---|---|---|
committer | Peter Kim <pk15950@gmail.com> | 2022-09-08 07:00:43 +0300 |
commit | e83f88c951e26b01893acee4f24b40a46062a41c (patch) | |
tree | 09f60bf7d4fc2ae1ef50668823e416fc675b252e /power_sequencer/operators/mouse_trim_modal.py | |
parent | ec84e3294593e2e26475f18c81e847bf00dc201e (diff) | |
parent | 0cd92169d40ae1c7e103ff269e850eaf1b901646 (diff) |
Merge branch 'master' into xr-devxr-dev
Diffstat (limited to 'power_sequencer/operators/mouse_trim_modal.py')
-rw-r--r-- | power_sequencer/operators/mouse_trim_modal.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/power_sequencer/operators/mouse_trim_modal.py b/power_sequencer/operators/mouse_trim_modal.py index a138933b..8136adae 100644 --- a/power_sequencer/operators/mouse_trim_modal.py +++ b/power_sequencer/operators/mouse_trim_modal.py @@ -1,10 +1,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later -# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors - -# This file is part of Power Sequencer. - +# 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 @@ -361,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) @@ -377,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): |