Blender Ktisu: Fix Drawing Sequence Line #157
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user