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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-04-18 18:13:44 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-04-18 18:13:44 +0300
commite47cb9ed5b5cc1a29efbd14de77177e08ba968aa (patch)
tree3f835812b87e45f1e812db9037aa89fa0da81d38 /space_view3d_math_vis
parentc56b463d06e6bd989019f2674775ec2cb511b823 (diff)
Fix lots of various issues failing automated test load/unload/reload.
Diffstat (limited to 'space_view3d_math_vis')
-rw-r--r--space_view3d_math_vis/draw.py8
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)