@Override
    public void read(JmeImporter im) throws IOException {
        super.read(im);
        InputCapsule in = im.getCapsule(this);
        skeleton = (Skeleton) in.readSavable("skeleton", null);

        numberOfBonesParam = (MatParamOverride) in.readSavable("numberOfBonesParam", null);
        boneMatricesParam = (MatParamOverride) in.readSavable("boneMatricesParam", null);

        if (numberOfBonesParam == null) {
            numberOfBonesParam = new MatParamOverride(VarType.Int, "NumberOfBones", null);
            boneMatricesParam = new MatParamOverride(VarType.Matrix4Array, "BoneMatrices", null);
            getSpatial().addMatParamOverride(numberOfBonesParam);
            getSpatial().addMatParamOverride(boneMatricesParam);
        }
    }
Specific method for skinning with tangents to avoid cluttering the
classic skinning calculation with null checks that would slow down the
process even if tangents don't have to be computed. Also the iteration
has additional indexes since tangent has 4 components instead of 3 for
pos and norm

@param mesh the mesh
@param offsetMatrices the offset matrices to apply
@param tb the tangent vertexBuffer
jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java