Bugfix: fixed a bug that caused NPE to be raised when armature modifier

was on the mesh that had no vertex groups.
experimental
jmekaelthas 10 years ago
parent 9efa32a250
commit de2d7eebf7
  1. 2
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/meshes/TemporalMesh.java

@ -406,7 +406,7 @@ public class TemporalMesh extends Geometry {
tempNormals[i] = normals.get(vertIndex);
tempVertColors[i] = vertexColors != null ? vertexColors.get(face.getIndexes().indexOf(vertIndex)) : null;
if (boneIndexes.size() > 0) {
if (boneIndexes.size() > 0 && vertexGroups.size() > 0) {
Map<Float, Integer> boneBuffersForVertex = new HashMap<Float, Integer>();
Map<String, Float> vertexGroupsForVertex = vertexGroups.get(vertIndex);
for (Entry<String, Integer> entry : boneIndexes.entrySet()) {

Loading…
Cancel
Save