Skip to content

Commit 608f760

Browse files
authored
Merge Tool Blender 4.4 compatibility
- Bump Mesh Merge Tool to version 1.3.3 - Fix compatibility with Blender 4.4 due to a breaking change in the Python API: https://developer.blender.org/docs/release_notes/4.4/python_api/#blender-based-python-classes-construction - Fixes #44
1 parent b2b5753 commit 608f760

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

mesh_merge_tool/__init__.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
bl_info = {
2020
"name": "Merge Tool",
21-
"description": "An interactive tool for merging vertices.",
21+
"description": "An interactive tool for merging vertices and edges.",
2222
"author": "Andreas Strømberg, Chris Kohl",
23-
"version": (1, 3, 2),
23+
"version": (1, 3, 3),
2424
"blender": (2, 93, 0),
2525
"location": "View3D > TOOLS > Merge Tool",
2626
"warning": "",
@@ -56,7 +56,6 @@
5656
shader_type = 'UNIFORM_COLOR'
5757
else:
5858
shader_type = '3D_UNIFORM_COLOR'
59-
6059

6160
classes = []
6261

@@ -66,7 +65,7 @@ class MergeToolPreferences(bpy.types.AddonPreferences):
6665
bl_idname = __name__
6766

6867
allow_multi: BoolProperty(name="Allow Multi-Merge",
69-
description="In Vertex mode, if there is a starting selection, merge all those vertices together",
68+
description="In Vertex mode only, if there is a starting selection, merge all those vertices together",
7069
default=True)
7170

7271
show_circ: BoolProperty(name="Show Circle",
@@ -185,7 +184,8 @@ def draw(self, context):
185184

186185

187186
class DrawPoint():
188-
def __init__(self):
187+
def __init__(self, *args, **kwargs):
188+
super().__init__(*args, **kwargs)
189189
self.shader = None
190190
self.coords = None
191191
self.color = None
@@ -207,7 +207,8 @@ def add(self, shader, coords, color):
207207

208208

209209
class DrawLine():
210-
def __init__(self):
210+
def __init__(self, *args, **kwargs):
211+
super().__init__(*args, **kwargs)
211212
self.shader = None
212213
self.coords = None
213214
self.color = None
@@ -226,7 +227,8 @@ def add(self, shader, coords, color):
226227

227228

228229
class DrawLineDashed():
229-
def __init__(self):
230+
def __init__(self, *args, **kwargs):
231+
super().__init__(*args, **kwargs)
230232
self.shader = None
231233
self.coords = None
232234
self.color = None
@@ -416,7 +418,7 @@ class MergeTool(bpy.types.Operator):
416418
description = "Merge location",
417419
items = [('FIRST', "First", "Components will be merged at the first component", 'TRIA_LEFT', 1),
418420
('LAST', "Last", "Components will be merged at the last component", 'TRIA_RIGHT', 2),
419-
('CENTER', "Center", "Components will be merged at the center between the two", 'TRIA_DOWN', 3)
421+
('CENTER', "Center", "Components will be merged at their center point", 'TRIA_DOWN', 3)
420422
],
421423
default = 'LAST'
422424
)
@@ -427,7 +429,8 @@ class MergeTool(bpy.types.Operator):
427429
default = False
428430
)
429431

430-
def __init__(self):
432+
def __init__(self, *args, **kwargs):
433+
super().__init__(*args, **kwargs)
431434
self.prefs = bpy.context.preferences.addons[__name__].preferences
432435
self.window = bpy.context.window_manager.windows[0]
433436
self.m_coord = None
@@ -656,7 +659,7 @@ class WorkSpaceMergeTool(bpy.types.WorkSpaceTool):
656659

657660
bl_idname = "edit_mesh.merge_tool"
658661
bl_label = "Merge Tool"
659-
bl_description = "Interactively merge vertices with the Merge Tool"
662+
bl_description = "Interactively merge vertices or edges"
660663
bl_icon = os.path.join(icon_dir, "ops.mesh.merge_tool")
661664
bl_cursor = t_cursor
662665
bl_widget = None

0 commit comments

Comments
 (0)