void blendAnimTransforms(Vector3f translation, Quaternion rotation, Vector3f scale, float weight) {
        if (userControl) {
            return;
        }

        if (weight == 0) {
            // Do not apply this transform at all.
            return;
        }

        if (currentWeightSum == 1) {
            return; // More than 2 transforms are being blended
        } else if (currentWeightSum == -1 || currentWeightSum == 0) {
            // Set the transform fully
            localPos.set(bindPos).addLocal(translation);
            localRot.set(bindRot).multLocal(rotation);
            if (scale != null) {
                localScale.set(bindScale).multLocal(scale);
            }
            // Set the weight. It will be applied in updateModelTransforms().
            currentWeightSum = weight;
        } else {
            // The weight is already set.
            // Blend in the new transform.
            TempVars vars = TempVars.get();

            Vector3f tmpV = vars.vect1;
            Vector3f tmpV2 = vars.vect2;
            Quaternion tmpQ = vars.quat1;

            tmpV.set(bindPos).addLocal(translation);
            localPos.interpolateLocal(tmpV, weight);

            tmpQ.set(bindRot).multLocal(rotation);
            localRot.nlerp(tmpQ, weight);

            if (scale != null) {
                tmpV2.set(bindScale).multLocal(scale);
                localScale.interpolateLocal(tmpV2, weight);
            }

            // Ensures no new weights will be blended in the future.
            currentWeightSum = 1;

            vars.release();
        }
    }
Blends the given animation transform onto the bone's local transform.
<p>
Subsequent calls of this method stack up, with the final transformation
of the bone computed at {@link #updateModelTransforms() } which resets
the stack.
<p>
E.g. a single transform blend with weight = 0.5 followed by an
updateModelTransforms() call will result in final transform = transform * 0.5.
Two transform blends with weight = 0.5 each will result in the two
transforms blended together (nlerp) with blend = 0.5.

@param translation The translation to blend in
@param rotation The rotation to blend in
@param scale The scale to blend in
@param weight The weight of the transform to apply. Set to 1.0 to prevent
any other transform from being applied until updateModelTransforms().
jme3-core/src/main/java/com/jme3/animation/Bone.java