diff --git a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderLoader.java b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderLoader.java index f519cb9b5..51df79d29 100644 --- a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderLoader.java +++ b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderLoader.java @@ -245,16 +245,18 @@ public class BlenderLoader implements AssetLoader { Structure objectStructure = pObject.fetchData().get(0); Object object = objectHelper.toObject(objectStructure, blenderContext); - if (object instanceof LightNode) { - result.addLight(((LightNode) object).getLight());// FIXME: check if this is needed !!! - result.attachChild((LightNode) object); - } else if (object instanceof Node) { + if (object instanceof Node) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "{0}: {1}--> {2}", new Object[] { ((Node) object).getName(), ((Node) object).getLocalTranslation().toString(), ((Node) object).getParent() == null ? "null" : ((Node) object).getParent().getName() }); } + if (((Node) object).getParent() == null) { result.attachChild((Spatial) object); } + + if(object instanceof LightNode) { + result.addLight(((LightNode) object).getLight()); + } } } }