Python Operator "Delete Edge Loop" (which keeps mesh connected)
changed selection if sliding operator failed. Simply added a
check for return value. Gosh, that Python code is not bad ;)
This commit is contained in:
Ton Roosendaal
2010-12-04 13:46:25 +00:00
parent fa4bbbb249
commit 282910fdae

View File

@@ -30,11 +30,12 @@ class MESH_OT_delete_edgeloop(bpy.types.Operator):
bl_label = "Delete Edge Loop"
def execute(self, context):
bpy.ops.transform.edge_slide(value=1.0)
bpy.ops.mesh.select_more()
bpy.ops.mesh.remove_doubles()
if bpy.ops.transform.edge_slide(value=1.0) == 'FINISHED':
bpy.ops.mesh.select_more()
bpy.ops.mesh.remove_doubles()
return {'FINISHED'}
return {'FINISHED'}
return {'CANCELLED'}
rna_path_prop = StringProperty(name="Context Attributes",
description="rna context string", maxlen=1024, default="")