[Bf-extensions-cvs] [b9079cc4] master: Sun Position: store and restore line width on North drawing

Damien Picard noreply at git.blender.org
Sun Jan 8 02:53:07 CET 2023


Commit: b9079cc426803b684ca362277b781b9ade07f404
Author: Damien Picard
Date:   Sat Jan 7 23:01:25 2023 +0100
Branches: master
https://developer.blender.org/rBAb9079cc426803b684ca362277b781b9ade07f404

Sun Position: store and restore line width on North drawing

===================================================================

M	sun_position/draw.py

===================================================================

diff --git a/sun_position/draw.py b/sun_position/draw.py
index 5c071641..2324b417 100644
--- a/sun_position/draw.py
+++ b/sun_position/draw.py
@@ -72,8 +72,10 @@ else:
         shader.uniform_float("u_Resolution", (bpy.context.region.width,
                                               bpy.context.region.height))
         shader.uniform_float("u_Color", color)
+        width = gpu.state.line_width_get()
         gpu.state.line_width_set(2.0)
         batch.draw(shader)
+        gpu.state.line_width_set(width)
 
 
     _north_handle = None



More information about the Bf-extensions-cvs mailing list