diff --git a/scripts-blender/addons/blender_kitsu/sqe/draw.py b/scripts-blender/addons/blender_kitsu/sqe/draw.py index 3314b3a3..77da1573 100644 --- a/scripts-blender/addons/blender_kitsu/sqe/draw.py +++ b/scripts-blender/addons/blender_kitsu/sqe/draw.py @@ -36,8 +36,12 @@ rect_coords = ((0, 0), (1, 0), (1, 1), (0, 1)) # If running in the background, no handles are registered, as drawing extra UI # elements does not make sense. # See register() and unregister(). +if bpy.app.version_string.split('.')[0] == '3': + color_key = "2D_UNIFORM_COLOR" +else: + color_key = "UNIFORM_COLOR" if not bpy.app.background: - ucolor_2d_shader = gpu.shader.from_builtin("UNIFORM_COLOR") # TEST THIS HOTFX + ucolor_2d_shader = gpu.shader.from_builtin(color_key) ucolor_2d_rect_batch = batch_for_shader( ucolor_2d_shader, "TRI_FAN", {"pos": rect_coords} )