From ee03907418fe4826f8a4af44fb8f0395248c55e6 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Mon, 21 Oct 2013 06:42:04 +0000 Subject: [PATCH] Changed the Mesh.isanimated to check for BindPose,BoneWeight, BoneIndex instead of just BindPose to avoid crashes in the skeleton control on old models. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10842 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/scene/Mesh.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/core/com/jme3/scene/Mesh.java b/engine/src/core/com/jme3/scene/Mesh.java index 1d567cdde..46a2f2e41 100644 --- a/engine/src/core/com/jme3/scene/Mesh.java +++ b/engine/src/core/com/jme3/scene/Mesh.java @@ -1304,7 +1304,8 @@ public class Mesh implements Savable, Cloneable { } public boolean isAnimated() { - return getBuffer(Type.BindPosePosition) != null; + //TODO this won't work once we have pose animations, we should find a better way to check for animation + return getBuffer(Type.BindPosePosition) != null && getBuffer(Type.BoneIndex) != null && getBuffer(Type.BoneWeight) != null; }