[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3325] contrib/py/scripts/addons/ mesh_bevel_round.py: Bevel round: fix a couple face-exists errors

Howard Trickey howard.trickey at gmail.com
Mon Apr 30 11:36:43 CEST 2012


Revision: 3325
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3325
Author:   howardt
Date:     2012-04-30 09:36:43 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
Bevel round: fix a couple face-exists errors

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

Modified: contrib/py/scripts/addons/mesh_bevel_round.py
===================================================================
--- contrib/py/scripts/addons/mesh_bevel_round.py	2012-04-30 07:28:24 UTC (rev 3324)
+++ contrib/py/scripts/addons/mesh_bevel_round.py	2012-04-30 09:36:43 UTC (rev 3325)
@@ -262,6 +262,8 @@
 
         # Creating the new faces
         for fc in self.hsh_faces.values():
+            if not fc.anynew():
+                continue
             lv = []
             for i in range(len(fc.bmverts)):
                 npl = fc.newpts[i]
@@ -274,6 +276,8 @@
         # Deleting the unneeded geometry
         for f in self.hsh_faces.values():
             if f.face.is_valid:
+                if not f.anynew():
+                    continue
                 fedges = f.face.edges[::]
                 self.bm.faces.remove(f.face)
                 for e in fedges:
@@ -834,11 +838,14 @@
         if n1 > 0:
             normalref1 = self.compute_normal_reference(ed1, face1, xsection1[0], xsection1[1])
 
-        # Parse close to the other face
+        # Part close to the other face
         if reversed:
             face2 = ed2.facemain
         else:
             face2 = find(ed2.lfaces, lambda f: f != ed2.facemain)
+        mesh2 = []
+        for i in range(0, nblat):
+            mesh1.append(self.build_lattice(i, xsection1, xsection2, None, None))
         if n2 > 0:
             normalref2 = self.compute_normal_reference(ed2, face2, xsection1[n1+1], xsection1[n1])
 
@@ -2541,6 +2548,12 @@
         # self.newpts[i] is list of float triple for replacement
         self.newpts = len(self.bmverts) * [None]
 
+    def anynew(self):
+        for p in self.newpts:
+            if p is not None:
+                return True
+        return False
+
     def __str__(self):
         return "f%d" % self.index
 



More information about the Bf-extensions-cvs mailing list