} else if (spatialNodes.get(i) instanceof Light){ if (ls==null){
} } for (int i=0;i<spatialLights.size();i++){ if (ls==null){
    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);                uberNode.attachChild(toAttach);            } else if (spatialNodes.get(i) instanceof Light){                if (ls==null){                    ls=DisplaySystem.getDisplaySystem().getRenderer().getLightState();                    ls.setEnabled(true);                }                ls.attach((Light) spatialNodes.get(i));            }        }        if (ls!=null)            uberNode.setRenderState(ls);        if (st.keyframes.size()==1)            st.setTimeFrame(0);        else            uberNode.addController(st);        st.setActive(true);        return uberNode;    }