Adding changes pointed out by madlion.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8036 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 14 years ago
parent 9f221b5801
commit ab26912f60
  1. 12
      engine/src/blender/com/jme3/scene/plugins/blender/BlenderModelLoader.java

@ -33,7 +33,6 @@ package com.jme3.scene.plugins.blender;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -134,13 +133,16 @@ public class BlenderModelLoader implements AssetLoader {
}
}
}
inputStream.close();
try {
inputStream.close();
} catch(IOException e) {
LOGGER.warning(e.getLocalizedMessage());
}
List<Node> objects = loadingResults.getObjects();
if (objects.size() > 0) {
Node modelNode = new Node(blenderKey.getName());
for (Iterator<Node> it = objects.iterator(); it.hasNext();) {
Node node = it.next();
modelNode.attachChild(node);
for(Node object : objects) {
modelNode.attachChild(object);
}
return modelNode;
} else if (objects.size() == 1) {

Loading…
Cancel
Save