protected VariableMapping parseMapping(Statement statement, boolean[] hasNameSpace) throws MatParseException {

        VariableMapping mapping = new VariableMapping();
        String[] cond = statement.getLine().split(":");
        String[] vars = cond[0].split("=");

        checkMappingFormat(vars, statement);

        ShaderNodeVariable[] variables = new ShaderNodeVariable[2];
        String[] swizzle = new String[2];
        String rightExpression = null;

        for (int i = 0; i < vars.length; i++) {

            final String var = vars[i].trim();

            // it seems that is expression, not variable
            if (var.contains("%%")) {
                rightExpression = var.substring(2, var.length() - 2);
                continue;
            }

            String[] expression = var.split("\\.");

            if (hasNameSpace[i]) {
                if (expression.length <= 3) {
                    variables[i] = new ShaderNodeVariable("", expression[0].trim(), expression[1].trim());
                }
                if (expression.length == 3) {
                    swizzle[i] = expression[2].trim();
                }
            } else {
                if (expression.length <= 2) {
                    variables[i] = new ShaderNodeVariable("", expression[0].trim());
                }
                if (expression.length == 2) {
                    swizzle[i] = expression[1].trim();
                }
            }
        }

        mapping.setLeftVariable(variables[0]);
        mapping.setLeftSwizzling(swizzle[0] != null ? swizzle[0] : "");

        if (rightExpression != null) {
            mapping.setRightExpression(rightExpression);
        } else {
            mapping.setRightVariable(variables[1]);
            mapping.setRightSwizzling(swizzle[1] != null ? swizzle[1] : "");
        }

        if (cond.length > 1) {
            extractCondition(cond[1], statement);
            mapping.setCondition(conditionParser.getFormattedExpression());
        }

        return mapping;
    }
Reads a mapping statement. Sets the nameSpace, name and swizzling of the
left variable. Sets the name, nameSpace and swizzling of the right
variable types will be determined later. Also, we can have the right part as expression.
<pre>
Format variable to variable: &lt;nameSpace&gt;.&lt;varName&gt;[.&lt;swizzling&gt;] = &lt;nameSpace&gt;.&lt;varName&gt;[.&lt;swizzling&gt;][:Condition]
Format expression to variable: &lt;nameSpace&gt;.&lt;varName&gt;[.&lt;swizzling&gt;] = %% expression %% [:Condition]
</pre>

@param statement the statement to read.
@param hasNameSpace indicate which vars have namespaces
@return the read mapping.
@throws MatParseException if the statement isn't valid.
jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java