Fix to ...ogrexml.anim.MeshAnimationController: softwareSkinUpdate()

I didn't see anyone commiting a fix, so I'd do it.



patch


Index: src/com/jmex/model/ogrexml/anim/MeshAnimationController.java
===================================================================
--- src/com/jmex/model/ogrexml/anim/MeshAnimationController.java   (revision 4556)
+++ src/com/jmex/model/ogrexml/anim/MeshAnimationController.java   (working copy)
@@ -363,11 +363,11 @@
 //                resultNorm.x += temp.x * weight;
 //                resultNorm.y += temp.y * weight;
 //                resultNorm.z += temp.z * weight;
-
-                ib.position(ib.position()+fourMinusMaxWeights);
-                wb.position(wb.position()+fourMinusMaxWeights);
             }
 
+            ib.position(ib.position()+fourMinusMaxWeights);
+            wb.position(wb.position()+fourMinusMaxWeights);
+
             // overwrite vertex with transformed pos
             vb.position(vb.position()-3);
             vb.put(resultVert.x).put(resultVert.y).put(resultVert.z);



The issue was also tracked (not by me), and be found here:
http://code.google.com/p/jmonkeyengine/issues/detail?id=46

BTW This is my first post to the forums... Hello world! :)

wow… a fix as fist post  :smiley:

Hello world!

Wow thank you very much!  :smiley:

Lots of people had issues with this.

I applied the fix so everyone who had issues with this please update.