Bugfix: fixed a bug that caused an exception to be throw when cloneForSpatial methods were called; this was caused by placing AnimControl before SkeletonControl in the Spatial's controls list

git-svn-id: https://jmonkeyengine.googlecode.com/svn/branches/gradle-restructure@11067 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
experimental
Kae..pl 11 years ago
parent b8714b0f10
commit bc6c3cd93e
  1. 7
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/animations/AnimationHelper.java

@ -136,6 +136,13 @@ public class AnimationHelper extends AbstractBlenderHelper {
}
control.setAnimations(anims);
node.addControl(control);
//make sure that SkeletonControl is added AFTER the AnimControl
SkeletonControl skeletonControl = node.getControl(SkeletonControl.class);
if(skeletonControl != null) {
node.removeControl(SkeletonControl.class);
node.addControl(skeletonControl);
}
}
}
}

Loading…
Cancel
Save