[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33469] trunk/blender/release/scripts/op/ wm.py: Bugfix #21893

Ton Roosendaal ton at blender.org
Sat Dec 4 14:46:25 CET 2010


Revision: 33469
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33469
Author:   ton
Date:     2010-12-04 14:46:25 +0100 (Sat, 04 Dec 2010)

Log Message:
-----------
Bugfix #21893

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 ;)

Modified Paths:
--------------
    trunk/blender/release/scripts/op/wm.py

Modified: trunk/blender/release/scripts/op/wm.py
===================================================================
--- trunk/blender/release/scripts/op/wm.py	2010-12-04 13:00:28 UTC (rev 33468)
+++ trunk/blender/release/scripts/op/wm.py	2010-12-04 13:46:25 UTC (rev 33469)
@@ -30,11 +30,12 @@
     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="")





More information about the Bf-blender-cvs mailing list