Bugfix: vertices colors are now applied correctly.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10891 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
experimental
Kae..pl 11 years ago
parent a4b6107f5b
commit a01e9ab41c
  1. 4
      engine/src/blender/com/jme3/scene/plugins/blender/meshes/MeshHelper.java

@ -496,7 +496,7 @@ public class MeshHelper extends AbstractBlenderHelper {
byte g = ((Number) color.getFieldValue("g")).byteValue();
byte b = ((Number) color.getFieldValue("b")).byteValue();
byte a = ((Number) color.getFieldValue("a")).byteValue();
verticesColors.add(new byte[] { b, g, r, a });
verticesColors.add(new byte[] { r, g, b, a });
}
}
return verticesColors;
@ -523,7 +523,7 @@ public class MeshHelper extends AbstractBlenderHelper {
Pointer pMVert = (Pointer) meshStructure.getFieldValue("mvert");
List<Structure> mVerts = pMVert.fetchData(blenderContext.getInputStream());
if (this.fixUpAxis) {
if (fixUpAxis) {
for (int i = 0; i < count; ++i) {
DynamicArray<Number> coordinates = (DynamicArray<Number>) mVerts.get(i).getFieldValue("co");
result[i][0] = new Vector3f(coordinates.get(0).floatValue(), coordinates.get(2).floatValue(), -coordinates.get(1).floatValue());

Loading…
Cancel
Save