diff options
Diffstat (limited to 'viewport_vr_preview')
-rw-r--r-- | viewport_vr_preview/__init__.py | 2 | ||||
-rw-r--r-- | viewport_vr_preview/operators.py | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/viewport_vr_preview/__init__.py b/viewport_vr_preview/__init__.py index eb7dca4d..cc4580ae 100644 --- a/viewport_vr_preview/__init__.py +++ b/viewport_vr_preview/__init__.py @@ -3,7 +3,7 @@ bl_info = { "name": "VR Scene Inspection", "author": "Julian Eisel (Severin), Sebastian Koenig, Peter Kim (muxed-reality)", - "version": (0, 11, 0), + "version": (0, 11, 1), "blender": (3, 2, 0), "location": "3D View > Sidebar > VR", "description": ("View the viewport with virtual reality glasses " diff --git a/viewport_vr_preview/operators.py b/viewport_vr_preview/operators.py index 3c92a44f..7981511e 100644 --- a/viewport_vr_preview/operators.py +++ b/viewport_vr_preview/operators.py @@ -12,7 +12,6 @@ from bpy.types import ( GizmoGroup, Operator, ) -import bgl import math from math import radians from mathutils import Euler, Matrix, Quaternion, Vector @@ -305,8 +304,8 @@ class VIEW3D_GT_vr_camera_cone(Gizmo): 'LINES', lines_shape_verts) # Ensure correct GL state (otherwise other gizmos might mess that up) - bgl.glLineWidth(1) - bgl.glEnable(bgl.GL_BLEND) + gpu.state.line_width_set(1.0) + gpu.state.blend_set('ALPHA') self.draw_custom_shape(self.frame_shape) self.draw_custom_shape(self.lines_shape) @@ -316,8 +315,8 @@ class VIEW3D_GT_vr_controller_grip(Gizmo): bl_idname = "VIEW_3D_GT_vr_controller_grip" def draw(self, context): - bgl.glLineWidth(1) - bgl.glEnable(bgl.GL_BLEND) + gpu.state.line_width_set(1.0) + gpu.state.blend_set('ALPHA') self.color = 0.422, 0.438, 0.446 self.draw_preset_circle(self.matrix_basis, axis='POS_X') @@ -329,8 +328,8 @@ class VIEW3D_GT_vr_controller_aim(Gizmo): bl_idname = "VIEW_3D_GT_vr_controller_aim" def draw(self, context): - bgl.glLineWidth(1) - bgl.glEnable(bgl.GL_BLEND) + gpu.state.line_width_set(1.0) + gpu.state.blend_set('ALPHA') self.color = 1.0, 0.2, 0.322 self.draw_preset_arrow(self.matrix_basis, axis='POS_X') |