Animation anim = control.getAnim(animName); AnimClip clip = new AnimClip(animName); Joint[] staticJoints = new Joint[joints.length];
Animation anim = animControl.getAnim(animName); if (anim == null) { anim = new Animation(animName, duration);
private void debugAnimation(AnimControl animation) throws Exception { System.out.println("ANIMATION DATA"); Skeleton skeleton = animation.getSkeleton(); debugSkeleton(skeleton); System.out.println("Animations bound to this control: "); Collection<String> animationNames = animation.getAnimationNames(); for (String string : animationNames) { Animation anim = animation.getAnim(string); debugAnimation(anim); } }
private void clearMoveAnimationBindings() { myNode.removeControl(figureControl); // Just returns false if not attached Animation oldAnim = figureControl.getAnim(MOVE_ANIM_NAME); if (oldAnim != null) { figureControl.removeAnim(oldAnim); } }
private static Node findAnimNode(Node node) { AnimControl l_animControl; l_animControl = node.getControl(AnimControl.class); if (l_animControl != null) { if (!l_animControl.getAnimationNames().isEmpty()) { Animation l_anim = l_animControl.getAnim(l_animControl.getAnimationNames().iterator().next()); if (l_anim != null && l_anim.getTracks().length > 0 && l_anim.getTracks()[0] instanceof BoneTrack) { return node; } } } for (Spatial l_child : node.getChildren()) { if(l_child.getControl(AnimControl.class) != null) { return (Node) l_child; } if(!(l_child instanceof Geometry)){ Node l_ret = findAnimNode((Node) l_child); if (l_ret != null) { return l_ret; } } } return null; }
Animation anim = animControl.getAnim(animName); if (anim == null) { anim = new Animation(animName, duration);