@Override
    public Spatial toJmeObject() {
        Spatial spatial;
        
        if (nodeAttribute instanceof FbxMesh) {
            FbxMesh fbxMesh = (FbxMesh) nodeAttribute;
            IntMap<Mesh> jmeMeshes = fbxMesh.getJmeObject();
            
            if (jmeMeshes == null || jmeMeshes.size() == 0) {
                // No meshes found on FBXMesh (??)
                logger.log(Level.WARNING, "No meshes could be loaded. Creating empty node.");
                spatial = new Node(getName() + "-node");
            } else {
                // Multiple jME3 geometries required for a single FBXMesh.
                String nodeName;
                if (children.isEmpty()) {
                    nodeName = getName() + "-mesh";
                } else {
                    nodeName = getName() + "-node";
                }
                Node node = new Node(nodeName);
                boolean singleMesh = jmeMeshes.size() == 1;
                for (IntMap.Entry<Mesh> meshInfo : jmeMeshes) {
                    node.attachChild(tryCreateGeometry(meshInfo.getKey(), meshInfo.getValue(), singleMesh));
                }
                spatial = node;
            }
        } else {
            if (nodeAttribute != null) {
                // Just specifies that this is a "null" node.
                nodeAttribute.getJmeObject();
            }
            
            // TODO: handle other node attribute types.
            //       right now everything we don't know about gets converted
            //       to jME3 Node.
            spatial = new Node(getName() + "-node");
        }
        
        if (!children.isEmpty()) {
            // Check uniform scale.
            // Although, if inheritType is 0 (eInheritRrSs)
            // it might not be a problem.
            Vector3f localScale = jmeLocalNodeTransform.getScale();
            if (!FastMath.approximateEquals(localScale.x, localScale.y) || 
                !FastMath.approximateEquals(localScale.x, localScale.z)) {
                logger.log(Level.WARNING, "Non-uniform scale detected on parent node. " +
                                          "The model may appear distorted.");
            }
        }
        
        spatial.setLocalTransform(jmeLocalNodeTransform);
        
        if (visibility == 0.0) {
            spatial.setCullHint(CullHint.Always);
        }
        
        for (Map.Entry<String, Object> userDataEntry : userData.entrySet()) {
            spatial.setUserData(userDataEntry.getKey(), userDataEntry.getValue());
        }
        
        return spatial;
    }
If this geometry node is deformed by a skeleton, this
returns the node containing the skeleton.

In jME3, a mesh can be deformed by a skeleton only if it is 
a child of the node containing the skeleton. However, this
is not a requirement in FBX, so we have to modify the scene graph
of the loaded model to adjust for this.
This happens automatically in 
{@link #createScene(com.jme3.scene.plugins.fbx.node.FbxNode)}.

@return The model this node would like to be a child of, or null
if no preferred parent.
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/node/FbxNode.java