From d3452297ce283ea361d8da8d6de780734db7dd20 Mon Sep 17 00:00:00 2001 From: "Kae..pl" Date: Tue, 3 Jul 2012 19:45:30 +0000 Subject: [PATCH] FIXED: Issue 515: Blender loader - "-1" bone indices are generated for this model git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9537 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../scene/plugins/blender/animations/ArmatureHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; }