diff --git a/src/blenderbim/blenderbim/bim/module/boundary/decorator.py b/src/blenderbim/blenderbim/bim/module/boundary/decorator.py index 360bdc6496..d48b60fe18 100644 --- a/src/blenderbim/blenderbim/bim/module/boundary/decorator.py +++ b/src/blenderbim/blenderbim/bim/module/boundary/decorator.py @@ -62,14 +62,14 @@ class BoundaryDecorator: gpu.state.point_size_set(6) gpu.state.blend_set("ALPHA") - self.line_shader = gpu.shader.from_builtin("3D_POLYLINE_UNIFORM_COLOR") + self.line_shader = gpu.shader.from_builtin("POLYLINE_UNIFORM_COLOR") self.line_shader.bind() # required to be able to change uniforms of the shader # POLYLINE_UNIFORM_COLOR specific uniforms self.line_shader.uniform_float("viewportSize", (context.region.width, context.region.height)) self.line_shader.uniform_float("lineWidth", 2.0) # general shader - self.shader = gpu.shader.from_builtin("3D_UNIFORM_COLOR") + self.shader = gpu.shader.from_builtin("UNIFORM_COLOR") selected_vertices = [] selected_edges = [] diff --git a/src/blenderbim/blenderbim/bim/module/drawing/decoration.py b/src/blenderbim/blenderbim/bim/module/drawing/decoration.py index 2c0bf10b1f..558522cce0 100644 --- a/src/blenderbim/blenderbim/bim/module/drawing/decoration.py +++ b/src/blenderbim/blenderbim/bim/module/drawing/decoration.py @@ -161,9 +161,9 @@ class BaseDecorator: os.path.join(bpy.context.scene.BIMProperties.data_dir, "fonts", "OpenGost Type B TT.ttf") ) - # 3D_POLYLINE_UNIFORM_COLOR is good for smoothed lines since `bgl.enable(GL_LINE_SMOOTH)` is deprecated - self.line_shader = gpu.shader.from_builtin("3D_POLYLINE_UNIFORM_COLOR") - self.base_shader = gpu.shader.from_builtin("3D_UNIFORM_COLOR") + # POLYLINE_UNIFORM_COLOR is good for smoothed lines since `bgl.enable(GL_LINE_SMOOTH)` is deprecated + self.line_shader = gpu.shader.from_builtin("POLYLINE_UNIFORM_COLOR") + self.base_shader = gpu.shader.from_builtin("UNIFORM_COLOR") def get_camera_width_mm(self): # Horrific prototype code to ensure bgl draws at drawing scales @@ -1563,15 +1563,15 @@ class CutDecorator: gpu.state.point_size_set(1) gpu.state.blend_set("ALPHA") - # 3D_POLYLINE_UNIFORM_COLOR is good for smoothed lines since `bgl.enable(GL_LINE_SMOOTH)` is deprecated - self.line_shader = gpu.shader.from_builtin("3D_POLYLINE_UNIFORM_COLOR") + # POLYLINE_UNIFORM_COLOR is good for smoothed lines since `bgl.enable(GL_LINE_SMOOTH)` is deprecated + self.line_shader = gpu.shader.from_builtin("POLYLINE_UNIFORM_COLOR") self.line_shader.bind() # POLYLINE_UNIFORM_COLOR specific uniforms self.line_shader.uniform_float("viewportSize", (context.region.width, context.region.height)) self.line_shader.uniform_float("lineWidth", 2.0) # general shader - self.shader = gpu.shader.from_builtin("3D_UNIFORM_COLOR") + self.shader = gpu.shader.from_builtin("UNIFORM_COLOR") self.shader.bind() black = (0, 0, 0, 1) @@ -1931,7 +1931,7 @@ class DecorationsHandler: if cls.installed: cls.uninstall() handler = cls() - # NOTE: we USE POST_PIXEL here so that we can use both 3D_POLYLINE_UNIFORM_COLOR + # NOTE: we USE POST_PIXEL here so that we can use both POLYLINE_UNIFORM_COLOR # and drawing text in the same handler. BUT this means that we supply coordinates in WINSPACE cls.installed = SpaceView3D.draw_handler_add(handler, (context,), "WINDOW", "POST_PIXEL") diff --git a/src/blenderbim/blenderbim/bim/module/drawing/shaders.py b/src/blenderbim/blenderbim/bim/module/drawing/shaders.py index 70d0742de5..1bd35ce297 100644 --- a/src/blenderbim/blenderbim/bim/module/drawing/shaders.py +++ b/src/blenderbim/blenderbim/bim/module/drawing/shaders.py @@ -288,9 +288,9 @@ class BaseShader: """ def __init__(self): - # 3D_POLYLINE_UNIFORM_COLOR is good for smoothed lines since `bgl.enable(GL_LINE_SMOOTH)` is deprecated - self.line_shader = gpu.shader.from_builtin("3D_POLYLINE_UNIFORM_COLOR") - self.base_shader = gpu.shader.from_builtin("3D_UNIFORM_COLOR") + # POLYLINE_UNIFORM_COLOR is good for smoothed lines since `bgl.enable(GL_LINE_SMOOTH)` is deprecated + self.line_shader = gpu.shader.from_builtin("POLYLINE_UNIFORM_COLOR") + self.base_shader = gpu.shader.from_builtin("UNIFORM_COLOR") def get_shader(self): """Returns shader for this type""" diff --git a/src/blenderbim/blenderbim/bim/module/model/decorator.py b/src/blenderbim/blenderbim/bim/module/model/decorator.py index 7eee9b3ae1..72d47d3c42 100644 --- a/src/blenderbim/blenderbim/bim/module/model/decorator.py +++ b/src/blenderbim/blenderbim/bim/module/model/decorator.py @@ -191,15 +191,15 @@ class ProfileDecorator: unselected_edges.append(edge_indices) ### Actually drawing - # 3D_POLYLINE_UNIFORM_COLOR is good for smoothed lines since `bgl.enable(GL_LINE_SMOOTH)` is deprecated - self.line_shader = gpu.shader.from_builtin("3D_POLYLINE_UNIFORM_COLOR") + # POLYLINE_UNIFORM_COLOR is good for smoothed lines since `bgl.enable(GL_LINE_SMOOTH)` is deprecated + self.line_shader = gpu.shader.from_builtin("POLYLINE_UNIFORM_COLOR") self.line_shader.bind() # POLYLINE_UNIFORM_COLOR specific uniforms self.line_shader.uniform_float("viewportSize", (context.region.width, context.region.height)) self.line_shader.uniform_float("lineWidth", 2.0) # general shader - self.shader = gpu.shader.from_builtin("3D_UNIFORM_COLOR") + self.shader = gpu.shader.from_builtin("UNIFORM_COLOR") self.shader.bind() # Draw faces diff --git a/src/blenderbim/blenderbim/bim/module/model/opening.py b/src/blenderbim/blenderbim/bim/module/model/opening.py index 9c98680917..795abf3652 100644 --- a/src/blenderbim/blenderbim/bim/module/model/opening.py +++ b/src/blenderbim/blenderbim/bim/module/model/opening.py @@ -873,14 +873,14 @@ class DecorationsHandler: if not obj: continue - self.line_shader = gpu.shader.from_builtin("3D_POLYLINE_UNIFORM_COLOR") + self.line_shader = gpu.shader.from_builtin("POLYLINE_UNIFORM_COLOR") self.line_shader.bind() # required to be able to change uniforms of the shader # POLYLINE_UNIFORM_COLOR specific uniforms self.line_shader.uniform_float("viewportSize", (context.region.width, context.region.height)) self.line_shader.uniform_float("lineWidth", 2.0) # general shader - self.shader = gpu.shader.from_builtin("3D_UNIFORM_COLOR") + self.shader = gpu.shader.from_builtin("UNIFORM_COLOR") verts = [] selected_edges = [] diff --git a/src/blenderbim/blenderbim/bim/module/system/decorator.py b/src/blenderbim/blenderbim/bim/module/system/decorator.py index e3e8518f79..146fa71abc 100644 --- a/src/blenderbim/blenderbim/bim/module/system/decorator.py +++ b/src/blenderbim/blenderbim/bim/module/system/decorator.py @@ -122,15 +122,15 @@ class SystemDecorator: selected_vertices = decoration_data["selected_vertices"] ### Actually drawing - # 3D_POLYLINE_UNIFORM_COLOR is good for smoothed lines since `bgl.enable(GL_LINE_SMOOTH)` is deprecated - self.line_shader = gpu.shader.from_builtin("3D_POLYLINE_UNIFORM_COLOR") + # POLYLINE_UNIFORM_COLOR is good for smoothed lines since `bgl.enable(GL_LINE_SMOOTH)` is deprecated + self.line_shader = gpu.shader.from_builtin("POLYLINE_UNIFORM_COLOR") self.line_shader.bind() # POLYLINE_UNIFORM_COLOR specific uniforms self.line_shader.uniform_float("viewportSize", (context.region.width, context.region.height)) self.line_shader.uniform_float("lineWidth", 2.0) # general shader - self.shader = gpu.shader.from_builtin("3D_UNIFORM_COLOR") + self.shader = gpu.shader.from_builtin("UNIFORM_COLOR") self.shader.bind() self.draw_batch("LINES", all_vertices, transparent_color(unselected_elements_color), unselected_edges)