@Override
    public void read(JmeImporter im) throws IOException {
        InputCapsule ic = im.getCapsule(this);
        wireframe = ic.readBoolean("wireframe", false);
        cullMode = ic.readEnum("cullMode", FaceCullMode.class, FaceCullMode.Back);
        depthWrite = ic.readBoolean("depthWrite", true);
        depthTest = ic.readBoolean("depthTest", true);
        colorWrite = ic.readBoolean("colorWrite", true);
        blendMode = ic.readEnum("blendMode", BlendMode.class, BlendMode.Off);
        offsetEnabled = ic.readBoolean("offsetEnabled", false);
        offsetFactor = ic.readFloat("offsetFactor", 0);
        offsetUnits = ic.readFloat("offsetUnits", 0);
        stencilTest = ic.readBoolean("stencilTest", false);
        frontStencilStencilFailOperation = ic.readEnum("frontStencilStencilFailOperation", StencilOperation.class, StencilOperation.Keep);
        frontStencilDepthFailOperation = ic.readEnum("frontStencilDepthFailOperation", StencilOperation.class, StencilOperation.Keep);
        frontStencilDepthPassOperation = ic.readEnum("frontStencilDepthPassOperation", StencilOperation.class, StencilOperation.Keep);
        backStencilStencilFailOperation = ic.readEnum("backStencilStencilFailOperation", StencilOperation.class, StencilOperation.Keep);
        backStencilDepthFailOperation = ic.readEnum("backStencilDepthFailOperation", StencilOperation.class, StencilOperation.Keep);
        backStencilDepthPassOperation = ic.readEnum("backStencilDepthPassOperation", StencilOperation.class, StencilOperation.Keep);
        frontStencilFunction = ic.readEnum("frontStencilFunction", TestFunction.class, TestFunction.Always);
        backStencilFunction = ic.readEnum("backStencilFunction", TestFunction.class, TestFunction.Always);
        frontStencilReference = ic.readInt("frontStencilReference", 0);
        backStencilReference = ic.readInt("backStencilReference", 0);
        frontStencilMask = ic.readInt("frontStencilMask", Integer.MAX_VALUE);
        backStencilMask = ic.readInt("backStencilMask", Integer.MAX_VALUE);
        blendEquation = ic.readEnum("blendEquation", BlendEquation.class, BlendEquation.Add);
        blendEquationAlpha = ic.readEnum("blendEquationAlpha", BlendEquationAlpha.class, BlendEquationAlpha.InheritColor);
        depthFunc = ic.readEnum("depthFunc", TestFunction.class, TestFunction.LessOrEqual);
        lineWidth = ic.readFloat("lineWidth", 1);
        sfactorRGB = ic.readEnum("sfactorRGB", BlendFunc.class, BlendFunc.One);
        dfactorRGB = ic.readEnum("dfactorRGB", BlendFunc.class, BlendFunc.One);
        sfactorAlpha = ic.readEnum("sfactorAlpha", BlendFunc.class, BlendFunc.One);
        dfactorAlpha = ic.readEnum("dfactorAlpha", BlendFunc.class, BlendFunc.One);


        applyWireFrame = ic.readBoolean("applyWireFrame", true);
        applyCullMode = ic.readBoolean("applyCullMode", true);
        applyDepthWrite = ic.readBoolean("applyDepthWrite", true);
        applyDepthTest = ic.readBoolean("applyDepthTest", true);
        applyColorWrite = ic.readBoolean("applyColorWrite", true);
        applyBlendMode = ic.readBoolean("applyBlendMode", true);
        applyPolyOffset = ic.readBoolean("applyPolyOffset", true);
        applyDepthFunc = ic.readBoolean("applyDepthFunc", true);
        applyLineWidth = ic.readBoolean("applyLineWidth", true);

    }
Does a bitwise invert of the value in the stencil buffer.
jme3-core/src/main/java/com/jme3/material/RenderState.java