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:
Diffstat (limited to 'release/scripts/modules')
-rw-r--r--release/scripts/modules/bpy_types.py2
-rw-r--r--release/scripts/modules/gpu_extras/presets.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 87b32eb1f40..b2f4d71ed92 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -793,7 +793,7 @@ class Gizmo(StructRNA):
vbo = GPUVertBuf(len=len(verts), format=fmt)
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')
+ shader = gpu.shader.from_builtin('UNIFORM_COLOR')
batch.program_set(shader)
return (batch, shader)
diff --git a/release/scripts/modules/gpu_extras/presets.py b/release/scripts/modules/gpu_extras/presets.py
index eba8d6c161d..f68824d76c8 100644
--- a/release/scripts/modules/gpu_extras/presets.py
+++ b/release/scripts/modules/gpu_extras/presets.py
@@ -42,7 +42,7 @@ def draw_circle_2d(position, color, radius, *, segments=None):
vbo = GPUVertBuf(len=len(verts), format=fmt)
vbo.attr_fill(id=pos_id, data=verts)
batch = GPUBatch(type='LINE_STRIP', buf=vbo)
- shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
+ shader = gpu.shader.from_builtin('UNIFORM_COLOR')
batch.program_set(shader)
shader.uniform_float("color", color)
batch.draw()
@@ -67,7 +67,7 @@ def draw_texture_2d(texture, position, width, height):
coords = ((0, 0), (1, 0), (1, 1), (0, 1))
- shader = gpu.shader.from_builtin('2D_IMAGE')
+ shader = gpu.shader.from_builtin('IMAGE')
batch = batch_for_shader(
shader, 'TRI_FAN',
{"pos": coords, "texCoord": coords},
@@ -77,7 +77,7 @@ def draw_texture_2d(texture, position, width, height):
gpu.matrix.translate(position)
gpu.matrix.scale((width, height))
- shader = gpu.shader.from_builtin('2D_IMAGE')
+ shader = gpu.shader.from_builtin('IMAGE')
shader.bind()
if isinstance(texture, int):