[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3771] branches/protopipe: Fixed bug in JointFactory

Aurel W aurel.w at gmail.com
Wed Sep 19 16:22:19 CEST 2012


Revision: 3771
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3771
Author:   aurel
Date:     2012-09-19 14:22:18 +0000 (Wed, 19 Sep 2012)
Log Message:
-----------
Fixed bug in JointFactory

Modified Paths:
--------------
    branches/protopipe/TODO
    branches/protopipe/jointproto.py
    branches/protopipe/modelbuilder.py

Modified: branches/protopipe/TODO
===================================================================
--- branches/protopipe/TODO	2012-09-19 14:03:24 UTC (rev 3770)
+++ branches/protopipe/TODO	2012-09-19 14:22:18 UTC (rev 3771)
@@ -1,2 +1,5 @@
 * Make numpy optional
-
+* Mapping + length check
+* Apply model transformations
+* Make deviation tollerance controlable
+* Apply mesh modifiers

Modified: branches/protopipe/jointproto.py
===================================================================
--- branches/protopipe/jointproto.py	2012-09-19 14:03:24 UTC (rev 3770)
+++ branches/protopipe/jointproto.py	2012-09-19 14:22:18 UTC (rev 3771)
@@ -178,7 +178,6 @@
                 continue # with permutation
 
             # everything is fine and aligned
-            print(rot_mat)
             return (True, rot_mat)
 
         return (False, None)
@@ -287,14 +286,12 @@
 
     def search(self, descriptor):
         super().search(descriptor)
-        isreg = False
         for jproto in self.protos:
             (isreg, rot_mat) = jproto.registerDescriptor(descriptor)
+            if isreg:
+                return (True, rot_mat, jproto)
 
-        if isreg:
-            return (True, rot_mat, jproto)
-        else:
-            return (False, None, None)
+        return (False, None, None)
 
 
 

Modified: branches/protopipe/modelbuilder.py
===================================================================
--- branches/protopipe/modelbuilder.py	2012-09-19 14:03:24 UTC (rev 3770)
+++ branches/protopipe/modelbuilder.py	2012-09-19 14:22:18 UTC (rev 3771)
@@ -46,6 +46,7 @@
             desc.buildFromVert(bm, vert.index)
             (reg, rot_mat, jproto) = ppapp.jointFactory.getProto(desc)
             if reg:
+                print("inserting model for joint")
                 self.insertJoint(vert.co, rot_mat, jproto)
 
 



More information about the Bf-extensions-cvs mailing list