Skip to content

Commit

Permalink
support for blender 4, fixed #1
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielBoxer committed Dec 8, 2023
1 parent 6ac817c commit 0a9d33f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"author": "Daniel Boxer",
"description": "Enhanced add mesh menu, cap tool, quick mirror, and more",
"blender": (2, 80, 0),
"version": (1, 3, 0),
"version": (1, 3, 1),
"location": "View3D > Ctrl Shift A/C, Alt M",
"category": "Mesh",
}
Expand Down
7 changes: 4 additions & 3 deletions line_draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import gpu
from gpu_extras.batch import batch_for_shader


SHADER_2D = gpu.shader.from_builtin("2D_UNIFORM_COLOR")
SHADER_3D = gpu.shader.from_builtin("3D_UNIFORM_COLOR")
SHADER_2D_NAME = "UNIFORM_COLOR" if bpy.app.version >= (4, 0, 0) else "2D_UNIFORM_COLOR"
SHADER_3D_NAME = "UNIFORM_COLOR" if bpy.app.version >= (4, 0, 0) else "3D_UNIFORM_COLOR"
SHADER_2D = gpu.shader.from_builtin(SHADER_2D_NAME)
SHADER_3D = gpu.shader.from_builtin(SHADER_3D_NAME)
COLOURS = {"X": (1, 0, 0, 1), "Y": (0, 1, 0, 1), "Z": (0, 0, 1, 1)}
handles = {}
batches = {}
Expand Down

0 comments on commit 0a9d33f

Please sign in to comment.