System Information
Operating system: Linux-5.8.16-2-MANJARO-x86_64-with-arch-Manjaro-Linux 64 Bits
Graphics card: GeForce GTX 1660 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.100
Blender Version
Broken: version: 2.91.0 Beta, branch: master, commit date: 2020-10-26 17:29, hash: rBedf4378c442a
Worked: 2.90
Short description of error
When I draw something with bgl and use:
bgl.glPointSize(41) #to default 1
The build-in knife tool UI is affected (knife draws huge vertices):
Exact steps for others to reproduce the error
Run script from attached blend file
Then run knife tool - it vertices higlight will be huge
import bpy
import gpu
import bgl
from gpu_extras.batch import batch_for_shader
coords = [(1, 1, 1), (-2, 0, 0), (-2, -1, 3), (0, 1, 1)]
shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR')
batch = batch_for_shader(shader, 'LINES', {"pos": coords})
def draw():
shader.bind()
shader.uniform_float("color", (1, 1, 0, 1))
batch.draw(shader)
bgl.glPointSize(41) #default 1
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')