Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormeta-androcto <meta.androcto1@gmail.com>2017-05-15 17:04:34 +0300
committermeta-androcto <meta.androcto1@gmail.com>2017-05-15 17:04:34 +0300
commitcc2e79bb382a8097481d2ff4763fc3ba7dc13689 (patch)
treeeb27a293f0bf16703e1cbd6a4cb4d5bc8443da0c
parentd611c451e39fb42dd43bdc09efa1deeca2362b62 (diff)
mesh edit tools, initial fix: T51483
-rw-r--r--mesh_extra_tools/mesh_edge_roundifier.py4
-rw-r--r--mesh_extra_tools/mesh_to_wall.py12
2 files changed, 13 insertions, 3 deletions
diff --git a/mesh_extra_tools/mesh_edge_roundifier.py b/mesh_extra_tools/mesh_edge_roundifier.py
index 52f7cadf..00b5c4b9 100644
--- a/mesh_extra_tools/mesh_edge_roundifier.py
+++ b/mesh_extra_tools/mesh_edge_roundifier.py
@@ -628,6 +628,10 @@ class EdgeRoundifier(Operator):
bpy.ops.object.mode_set(mode='OBJECT')
bm.to_mesh(mesh)
bpy.ops.object.mode_set(mode='EDIT')
+ bpy.ops.mesh.select_all(action='TOGGLE')
+ bpy.ops.mesh.select_all(action='INVERT')
+ bpy.ops.mesh.remove_doubles()
+
bm.free()
return {'FINISHED'}
diff --git a/mesh_extra_tools/mesh_to_wall.py b/mesh_extra_tools/mesh_to_wall.py
index 51d82f22..bc6c753b 100644
--- a/mesh_extra_tools/mesh_to_wall.py
+++ b/mesh_extra_tools/mesh_to_wall.py
@@ -72,6 +72,7 @@ def turn_left(bm, v1, v2, vm, wm):
verts = qq_sort(bm, links[-1], vm, wm)
v = verts.index(links[-2])
+
if v == 0:
v_nxt = verts[-1]
else:
@@ -191,13 +192,18 @@ class MeshtoWall(Operator):
return True
def execute(self, context):
+ # Note: the remove_doubles called after bmesh creation would make
+ # blender crash with certain meshes - keep it in mind for the future
+ bpy.ops.mesh.remove_doubles(threshold=0.003) # <<< Remove doubles is called from here
bpy.ops.object.mode_set(mode='OBJECT')
if self.check_vert(context):
bpy.ops.object.mode_set(mode='EDIT')
ob = bpy.context.object
- bm = bmesh.from_edit_mesh(ob.data)
- bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=0.003)
- bmesh.ops.delete(bm, geom=bm.faces, context=3)
+
+ me = ob.data
+ bm = bmesh.from_edit_mesh(me)
+ bpy.ops.mesh.delete(type='ONLY_FACE')
+
context.tool_settings.mesh_select_mode = (True, True, False)
v3d = context.space_data