public void setKeyframesWeight(float[] weights) {
        if (times == null) {
            throw new IllegalStateException("MorphTrack doesn't have any time for key frames, please call setTimes first");
        }
        if (weights.length == 0) {
            throw new IllegalArgumentException("MorphTrack with no weight keyframes!");
        }
        if (times.length * nbMorphTargets != weights.length) {
            throw new IllegalArgumentException("weights.length must equal nbMorphTargets * times.length");
        }

        this.weights = weights;
    }
Set the weights for this morph track. Note that the number of weights
must equal the number of frames times the number of morph targets.

@param weights  the weights of the morphs for each frame (alias created
                -- do not modify after passing it to this setter)

@throws IllegalStateException if this track does not have times set
@throws IllegalArgumentException if weights is an empty array or if
        the number of weights violates the frame count constraint
jme3-core/src/main/java/com/jme3/anim/MorphTrack.java