Change edgeloop delete to use dissolve, fixes bug [#35738].
Was using edge-slide & remove-doubles but this was error prone since remove doubles could fail in some cases or find doubles where it shouldn't (with very small scale objects). This gives more predictable behavior when the edges of a loop wouldnt slide (in that case they would just drag over to one of the sides with no user control) and multiple edge loops work better too. eg: - http://www.graphicall.org/ftp/ideasman42/edge_loop_del_update.png
This commit is contained in:
@@ -32,30 +32,6 @@ from rna_prop_ui import rna_idprop_ui_prop_get, rna_idprop_ui_prop_clear
|
||||
from bpy.app.translations import pgettext_tip as tip_
|
||||
|
||||
|
||||
class MESH_OT_delete_edgeloop(Operator):
|
||||
"""Delete an edge loop by merging the faces on each side """ \
|
||||
"""to a single face loop"""
|
||||
bl_idname = "mesh.delete_edgeloop"
|
||||
bl_label = "Delete Edge Loop"
|
||||
bl_options = {'UNDO', 'REGISTER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return bpy.ops.transform.edge_slide.poll()
|
||||
|
||||
def execute(self, context):
|
||||
mesh = context.object.data
|
||||
use_mirror_x = mesh.use_mirror_x
|
||||
mesh.use_mirror_x = False
|
||||
if 'FINISHED' in bpy.ops.transform.edge_slide(value=1.0, correct_uv=True):
|
||||
bpy.ops.mesh.select_more()
|
||||
bpy.ops.mesh.remove_doubles()
|
||||
ret = {'FINISHED'}
|
||||
else:
|
||||
ret = {'CANCELLED'}
|
||||
mesh.use_mirror_x = use_mirror_x
|
||||
return ret
|
||||
|
||||
rna_path_prop = StringProperty(
|
||||
name="Context Attributes",
|
||||
description="RNA context string",
|
||||
|
||||
Reference in New Issue
Block a user