diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/animations/AnimationHelper.java b/engine/src/blender/com/jme3/scene/plugins/blender/animations/AnimationHelper.java index 19c51b422..bb73db037 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/animations/AnimationHelper.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/animations/AnimationHelper.java @@ -274,8 +274,10 @@ public class AnimationHelper extends AbstractBlenderHelper { if (!p.isNull()) { Structure ipoStructure = p.fetchData().get(0); Ipo ipo = this.fromIpoStructure(ipoStructure, blenderContext); - lastFrame = Math.max(lastFrame, ipo.getLastFrame()); - blenderAction.featuresTracks.put(animatedFeatureName, ipo); + if(ipo != null) {//this can happen when ipo with no curves appear in blender file + lastFrame = Math.max(lastFrame, ipo.getLastFrame()); + blenderAction.featuresTracks.put(animatedFeatureName, ipo); + } } } blenderAction.stopFrame = lastFrame; @@ -364,9 +366,8 @@ public class AnimationHelper extends AbstractBlenderHelper { public BoneTrack[] toTracks(Skeleton skeleton) { List tracks = new ArrayList(featuresTracks.size()); for (Entry entry : featuresTracks.entrySet()) { - Bone bone = skeleton.getBone(entry.getKey()); int boneIndex = skeleton.getBoneIndex(entry.getKey()); - tracks.add((BoneTrack) entry.getValue().calculateTrack(boneIndex, bone.getLocalPosition(), bone.getLocalRotation(), bone.getLocalScale(), 1, stopFrame, fps, false)); + tracks.add((BoneTrack) entry.getValue().calculateTrack(boneIndex, Vector3f.ZERO, Quaternion.IDENTITY, Vector3f.UNIT_XYZ, 1, stopFrame, fps, false)); } return tracks.toArray(new BoneTrack[tracks.size()]); }