for (int i=0;i<spatialLights.size();i++){ if (ls==null){ ls=DisplaySystem.getDisplaySystem().getRenderer().createLightState(); ls.setEnabled(true);
LightState ls = null; for ( Light spatialLight : spatialLights ) { if ( ls == null ) { ls = DisplaySystem.getDisplaySystem().getRenderer().createLightState(); ls.setEnabled( true );
    public Node buildScene() throws IOException {        buildObject();        putTranslations();        Node uberNode=new Node("TDS Scene");        LightState ls=null;        for (int i=0;i<spatialNodes.size();i++){            if (spatialNodes.get(i) instanceof Spatial){                Spatial toAttach=(Spatial)spatialNodes.get(i);                if ( toAttach.getParent() == null ) {                    uberNode.attachChild(toAttach);                }            }        }        for (int i=0;i<spatialLights.size();i++){            if (ls==null){                    ls=DisplaySystem.getDisplaySystem().getRenderer().createLightState();                    ls.setEnabled(true);            }            ls.attach((Light) spatialLights.get(i));        }        if (ls!=null)            uberNode.setRenderState(ls);        if (keyframes!=null){                        st.interpolateMissing();            uberNode.addController(st);                        st.setActive(true);        }        return uberNode;    }