Blender Ktisu: Fix Drawing Sequence Line #157

Merged
Nick Alberelli merged 2 commits from :fix/blender-kitsu-draw into main 2023-10-31 12:21:18 +01:00
Showing only changes of commit 09ab371cfc - Show all commits

View File

@ -23,7 +23,6 @@
import typing
import bpy
import bgl
import gpu
from gpu_extras.batch import batch_for_shader
@ -54,7 +53,7 @@ Float4 = typing.Tuple[float, float, float, float]
def draw_line(position: Float2, size: Float2, color: Float4):
with gpu.matrix.push_pop():
bgl.glEnable(bgl.GL_BLEND)
gpu.state.blend_set("ALPHA")
gpu.matrix.translate(position)
gpu.matrix.scale(size)
@ -64,7 +63,7 @@ def draw_line(position: Float2, size: Float2, color: Float4):
ucolor_2d_shader.uniform_float("color", color)
ucolor_2d_rect_batch.draw(ucolor_2d_shader)
bgl.glDisable(bgl.GL_BLEND)
gpu.state.blend_set("NONE")
def get_strip_rectf(strip) -> Float4: