diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/MeshHelper.java b/engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/MeshHelper.java index 3dd26747b..1388de44a 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/MeshHelper.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/MeshHelper.java @@ -156,9 +156,9 @@ public class MeshHelper extends AbstractBlenderHelper { materialWithoutTextures = pImage.isNull(); // uvs always must be added wheater we have texture or not uvs = (DynamicArray) mtFace.getFieldValue("uv"); - uvCoordinates.add(new Vector2f(uvs.get(0, 0).floatValue(), 1.0f - uvs.get(0, 1).floatValue())); - uvCoordinates.add(new Vector2f(uvs.get(1, 0).floatValue(), 1.0f - uvs.get(1, 1).floatValue())); - uvCoordinates.add(new Vector2f(uvs.get(2, 0).floatValue(), 1.0f - uvs.get(2, 1).floatValue())); + uvCoordinates.add(new Vector2f(uvs.get(0, 0).floatValue(), uvs.get(0, 1).floatValue())); + uvCoordinates.add(new Vector2f(uvs.get(1, 0).floatValue(), uvs.get(1, 1).floatValue())); + uvCoordinates.add(new Vector2f(uvs.get(2, 0).floatValue(), uvs.get(2, 1).floatValue())); } int matNr = ((Number) mFace.getFieldValue("mat_nr")).intValue(); Integer materialNumber = Integer.valueOf(materialWithoutTextures ? -1 * matNr - 1 : matNr); @@ -202,9 +202,9 @@ public class MeshHelper extends AbstractBlenderHelper { if (v4 > 0) { if (uvs != null) { - uvCoordinates.add(new Vector2f(uvs.get(0, 0).floatValue(), 1.0f - uvs.get(0, 1).floatValue())); - uvCoordinates.add(new Vector2f(uvs.get(2, 0).floatValue(), 1.0f - uvs.get(2, 1).floatValue())); - uvCoordinates.add(new Vector2f(uvs.get(3, 0).floatValue(), 1.0f - uvs.get(3, 1).floatValue())); + uvCoordinates.add(new Vector2f(uvs.get(0, 0).floatValue(), uvs.get(0, 1).floatValue())); + uvCoordinates.add(new Vector2f(uvs.get(2, 0).floatValue(), uvs.get(2, 1).floatValue())); + uvCoordinates.add(new Vector2f(uvs.get(3, 0).floatValue(), uvs.get(3, 1).floatValue())); } this.appendVertexReference(v1, vertexList.size(), vertexReferenceMap); indexList.add(vertexList.size()); @@ -511,7 +511,7 @@ public class MeshHelper extends AbstractBlenderHelper { // (max. 4 in JME) Pointer pDW = (Pointer) dvert.getFieldValue("dw"); List vertexIndices = vertexReferenceMap.get(Integer.valueOf(vertexIndex));// we fetch the referenced vertices here - if (totweight > 0 && pDW.isNotNull()) {// pDW should never be null here, but I check it just in case :) + if (totweight > 0 && pDW.isNotNull() && groupToBoneIndexMap!=null) {// pDW should never be null here, but I check it just in case :) int weightIndex = 0; List dw = pDW.fetchData(dataRepository.getInputStream()); for (Structure deformWeight : dw) {