void resetToBind() {
        for (Geometry geometry : targets) {
            Mesh mesh = geometry.getMesh();
            if (mesh != null && mesh.isAnimated()) {
                Buffer bwBuff = mesh.getBuffer(Type.BoneWeight).getData();
                Buffer biBuff = mesh.getBuffer(Type.BoneIndex).getData();
                if (!biBuff.hasArray() || !bwBuff.hasArray()) {
                    mesh.prepareForAnim(true); // prepare for software animation
                }
                VertexBuffer bindPos = mesh.getBuffer(Type.BindPosePosition);
                VertexBuffer bindNorm = mesh.getBuffer(Type.BindPoseNormal);
                VertexBuffer pos = mesh.getBuffer(Type.Position);
                FloatBuffer pb = (FloatBuffer) pos.getData();
                FloatBuffer bpb = (FloatBuffer) bindPos.getData();
                pb.clear();
                bpb.clear();

                // reset bind normals if there is a BindPoseNormal buffer
                if (bindNorm != null) {
                    VertexBuffer norm = mesh.getBuffer(Type.Normal);
                    FloatBuffer nb = (FloatBuffer) norm.getData();
                    FloatBuffer bnb = (FloatBuffer) bindNorm.getData();
                    nb.clear();
                    bnb.clear();
                    nb.put(bnb).clear();
                }

                //resetting bind tangents if there is a bind tangent buffer
                VertexBuffer bindTangents = mesh.getBuffer(Type.BindPoseTangent);
                if (bindTangents != null) {
                    VertexBuffer tangents = mesh.getBuffer(Type.Tangent);
                    FloatBuffer tb = (FloatBuffer) tangents.getData();
                    FloatBuffer btb = (FloatBuffer) bindTangents.getData();
                    tb.clear();
                    btb.clear();
                    tb.put(btb).clear();
                }

                pb.put(bpb).clear();
            }
        }
    }
If specified the geometry has an animated mesh, add its mesh and material
to the lists of animation targets.
jme3-core/src/main/java/com/jme3/anim/SkinningControl.java