Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2019-05-30 00:19:42 +0300
committermano-wii <germano.costa@ig.com.br>2019-05-30 00:20:24 +0300
commit41394f54d44bcc3ca5085af787baaf99a1180acb (patch)
tree5e41dc9e073a9607a96a1dd08aac09d005d2939d /mesh_snap_utilities_line
parentf3352059b368d0cb8454318c8772767242cd648f (diff)
mesh_snap_utilities_line: fix missing detail in last update.
I should've tested first.
Diffstat (limited to 'mesh_snap_utilities_line')
-rw-r--r--mesh_snap_utilities_line/__init__.py2
-rw-r--r--mesh_snap_utilities_line/drawing_utilities.py14
2 files changed, 15 insertions, 1 deletions
diff --git a/mesh_snap_utilities_line/__init__.py b/mesh_snap_utilities_line/__init__.py
index 14c149d8..3a8af44d 100644
--- a/mesh_snap_utilities_line/__init__.py
+++ b/mesh_snap_utilities_line/__init__.py
@@ -22,7 +22,7 @@
bl_info = {
"name": "Snap_Utilities_Line",
"author": "Germano Cavalcante",
- "version": (5, 9, 14),
+ "version": (5, 9, 15),
"blender": (2, 80, 0),
"location": "View3D > TOOLS > Line Tool",
"description": "Extends Blender Snap controls",
diff --git a/mesh_snap_utilities_line/drawing_utilities.py b/mesh_snap_utilities_line/drawing_utilities.py
index c2e7dab2..0488f0f3 100644
--- a/mesh_snap_utilities_line/drawing_utilities.py
+++ b/mesh_snap_utilities_line/drawing_utilities.py
@@ -70,6 +70,20 @@ class SnapDrawn():
self._batch_point = None
+
+ def _gl_state_push(self):
+ self._is_point_size_enabled = bgl.glIsEnabled(bgl.GL_PROGRAM_POINT_SIZE)
+ if self._is_point_size_enabled:
+ bgl.glDisable(bgl.GL_PROGRAM_POINT_SIZE)
+
+ # draw 3d point OpenGL in the 3D View
+ bgl.glEnable(bgl.GL_BLEND)
+
+ def _gl_state_restore(self):
+ bgl.glDisable(bgl.GL_BLEND)
+ if self._is_point_size_enabled:
+ bgl.glEnable(bgl.GL_PROGRAM_POINT_SIZE)
+
def batch_line_strip_create(self, coords):
from gpu.types import (
GPUVertBuf,