[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1161] contrib/py/scripts/addons/ mesh_bridge.py: Version 1.4.3

Bart Crouch bartius.crouch at gmail.com
Tue Nov 16 14:49:12 CET 2010


Revision: 1161
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1161
Author:   crouch
Date:     2010-11-16 14:49:12 +0100 (Tue, 16 Nov 2010)

Log Message:
-----------
Version 1.4.3
- Fixes for change in API (#33029, vector*matrix)
- Removed registration duplication

Modified Paths:
--------------
    contrib/py/scripts/addons/mesh_bridge.py

Modified: contrib/py/scripts/addons/mesh_bridge.py
===================================================================
--- contrib/py/scripts/addons/mesh_bridge.py	2010-11-16 13:20:04 UTC (rev 1160)
+++ contrib/py/scripts/addons/mesh_bridge.py	2010-11-16 13:49:12 UTC (rev 1161)
@@ -31,9 +31,9 @@
 bl_addon_info = {
     'name': 'Bridge',
     'author': 'Bartius Crouch',
-    'version': (1, 4, 0),
-    'blender': (2, 5, 5),
-    'api': 32738,
+    'version': (1, 4, 3),
+    'blender': (2, 5, 6),
+    'api': 33078,
     'location': 'View3D > Ctrl+F > Bridge',
     'warning': '',
     'description': 'Bridge two, or loft several, loops of vertices.',
@@ -353,7 +353,7 @@
         
         # match start vertex of loop1 with loop2
         target_vector = mesh.vertices[loop2[0]].co - center2
-        dif_angles = [[(rotation_matrix * (mesh.vertices[vertex].co - center1)).angle(target_vector, 0), False, i] for i, vertex in enumerate(loop1)]
+        dif_angles = [[((mesh.vertices[vertex].co - center1) * rotation_matrix).angle(target_vector, 0), False, i] for i, vertex in enumerate(loop1)]
         dif_angles.sort()
         if len(loop1) != len(loop2):
             angle_limit = dif_angles[0][0] * 1.2 # 20% margin
@@ -413,7 +413,7 @@
                 if len(loop1) - shifting < len(loop2):
                     shifting = False
                     break
-                to_last, to_first = [(rotation_matrix * (mesh.vertices[loop1[-1]].co - center1)).angle((mesh.vertices[loop2[i]].co - center2), 0) for i in [-1, 0]]
+                to_last, to_first = [((mesh.vertices[loop1[-1]].co - center1) * rotation_matrix).angle((mesh.vertices[loop2[i]].co - center2), 0) for i in [-1, 0]]
                 if to_first < to_last:
                     loop1 = [loop1[-1]] + loop1[:-1]
                     shifting += 1
@@ -1038,4 +1038,3 @@
 
 if __name__ == '__main__':
     bpy.ops.mesh.bridge()
-register()
\ No newline at end of file




More information about the Bf-extensions-cvs mailing list