diff options
Diffstat (limited to 'release/scripts/templates_py/operator_modal_draw.py')
-rw-r--r-- | release/scripts/templates_py/operator_modal_draw.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/release/scripts/templates_py/operator_modal_draw.py b/release/scripts/templates_py/operator_modal_draw.py index 20e888ad5f3..77371a75605 100644 --- a/release/scripts/templates_py/operator_modal_draw.py +++ b/release/scripts/templates_py/operator_modal_draw.py @@ -15,11 +15,10 @@ def draw_callback_px(self, context): blf.draw(font_id, "Hello Word " + str(len(self.mouse_path))) # 50% alpha, 2 pixel width line - shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR') + shader = gpu.shader.from_builtin('UNIFORM_COLOR') gpu.state.blend_set('ALPHA') gpu.state.line_width_set(2.0) batch = batch_for_shader(shader, 'LINE_STRIP', {"pos": self.mouse_path}) - shader.bind() shader.uniform_float("color", (0.0, 0.0, 0.0, 0.5)) batch.draw(shader) |