diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-04-18 18:13:44 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-04-18 18:13:44 +0300 |
commit | e47cb9ed5b5cc1a29efbd14de77177e08ba968aa (patch) | |
tree | 3f835812b87e45f1e812db9037aa89fa0da81d38 /space_view3d_math_vis/draw.py | |
parent | c56b463d06e6bd989019f2674775ec2cb511b823 (diff) |
Fix lots of various issues failing automated test load/unload/reload.
Diffstat (limited to 'space_view3d_math_vis/draw.py')
-rw-r--r-- | space_view3d_math_vis/draw.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/space_view3d_math_vis/draw.py b/space_view3d_math_vis/draw.py index a31d284b..f9777e77 100644 --- a/space_view3d_math_vis/draw.py +++ b/space_view3d_math_vis/draw.py @@ -30,8 +30,12 @@ from mathutils import Vector SpaceView3D = bpy.types.SpaceView3D callback_handle = [] -single_color_shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR') -smooth_color_shader = gpu.shader.from_builtin('3D_SMOOTH_COLOR') +if not bpy.app.background: + single_color_shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR') + smooth_color_shader = gpu.shader.from_builtin('3D_SMOOTH_COLOR') +else: + single_color_shader = None + smooth_color_shader = None COLOR_POINT = (1.0, 0.0, 1.0, 1) COLOR_LINE = (0.5, 0.5, 1, 1) |