From ded6dce7153315afcc2a4b68e3ed5824703b3bb8 Mon Sep 17 00:00:00 2001 From: "Kae..pl" Date: Tue, 29 Jan 2013 14:47:44 +0000 Subject: [PATCH] Bugfix: fixed a bug that occured when vertex had more than 4 weights but the first 4 weights were not attached to any bone. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10233 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../jme3/scene/plugins/blender/modifiers/ArmatureModifier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java b/engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java index 2ca784cb0..cc46cd309 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java @@ -333,7 +333,7 @@ import com.jme3.util.BufferUtils; } else if(weight > 0) {//if weight is zero the simply ignore it warnAboutTooManyVertexWeights = true; Entry lowestWeightAndIndex = weightToIndexMap.firstEntry(); - if(lowestWeightAndIndex.getKey() < weight) { + if(lowestWeightAndIndex != null && lowestWeightAndIndex.getKey() < weight) { weightsFloatData.put(lowestWeightAndIndex.getValue(), weight); indicesData.put(lowestWeightAndIndex.getValue(), boneIndex.byteValue()); weightToIndexMap.remove(lowestWeightAndIndex.getKey());