diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/animations/ArmatureHelper.java b/engine/src/blender/com/jme3/scene/plugins/blender/animations/ArmatureHelper.java index dce0e851d..652d173d9 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/animations/ArmatureHelper.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/animations/ArmatureHelper.java @@ -130,9 +130,9 @@ public class ArmatureHelper extends AbstractBlenderHelper { int groupIndex = 0; for (Structure deformGroup : deformGroups) { String deformGroupName = deformGroup.getFieldValue("name").toString(); - Integer boneIndex = this.getBoneIndex(skeleton, deformGroupName); - if (boneIndex != null) { - result.put(Integer.valueOf(groupIndex), boneIndex); + int boneIndex = this.getBoneIndex(skeleton, deformGroupName); + if (boneIndex >= 0) { + result.put(groupIndex, boneIndex); } ++groupIndex; }