Skip to content

Commit 505c285

Browse files
committed
Blender 4.x fixes
1 parent 89541d0 commit 505c285

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

operators/utils/bgis_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def adjust3Dview(context, bbox, zoomToSelect=True):
105105
overrideContext['area'] = area
106106
overrideContext['region'] = area.regions[-1]
107107
if bpy.app.version[0] > 3:
108-
with context.temp_override(overrideContext):
108+
with context.temp_override(**overrideContext):
109109
bpy.ops.view3d.view_selected()
110110
else:
111111
bpy.ops.view3d.view_selected(overrideContext)

operators/view3d_mapviewer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def drawZoomBox(self, context):
329329
p3 = (px, 0, 0)
330330
p4 = (px, context.area.height, 0)
331331
coords = [p1, p2, p3, p4]
332-
shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR')
332+
shader = gpu.shader.from_builtin('UNIFORM_COLOR')
333333
batch = batch_for_shader(shader, 'LINES', {"pos": coords})
334334
shader.bind()
335335
shader.uniform_float("color", (0, 0, 0, 1))
@@ -341,7 +341,7 @@ def drawZoomBox(self, context):
341341
p3 = (self.zb_xmax, self.zb_ymax, 0)
342342
p4 = (self.zb_xmax, self.zb_ymin, 0)
343343
coords = [p1, p2, p2, p3, p3, p4, p4, p1]
344-
shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR')
344+
shader = gpu.shader.from_builtin('UNIFORM_COLOR')
345345
batch = batch_for_shader(shader, 'LINES', {"pos": coords})
346346
shader.bind()
347347
shader.uniform_float("color", (0, 0, 0, 1))

0 commit comments

Comments
 (0)