Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-10-26 04:43:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-26 04:43:40 +0300
commit4c75cc488a49ff9dedf9b0aa520f8688d753b987 (patch)
treeadf09b47a11c72783b665ea36638af5dccb2f31f /release/scripts/modules/bpy_types.py
parent0264c050bf277494a187b32d51be13b0760f81c0 (diff)
Correction for Gizmo.draw_custom_shape utility API
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r--release/scripts/modules/bpy_types.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index f8eabdde8ef..0ef1f4504e1 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -595,6 +595,7 @@ class Gizmo(StructRNA):
matrix = self.matrix_world
batch, shader = shape
+ shader.bind()
if select_id is not None:
gpu.select.load_id(select_id)
@@ -603,7 +604,6 @@ class Gizmo(StructRNA):
color = (*self.color_highlight, self.alpha_highlight)
else:
color = (*self.color, self.alpha)
- batch.program_set(shader)
shader.uniform_float("color", color)
with gpu.matrix.push_pop():
@@ -639,6 +639,7 @@ class Gizmo(StructRNA):
vbo.attr_fill(id=pos_id, data=verts)
batch = GPUBatch(type=type, buf=vbo)
shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR' if dims == 3 else '2D_UNIFORM_COLOR')
+ batch.program_set(shader)
return (batch, shader)