Fix #324. Blender importer now respects the lightNode pos in the graph
The light is still being added, however, to the scene root node as this is the blender behavior and a wysiwyg is desired.
This commit is contained in:
parent
7b0471c43a
commit
304550a0f4
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user