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

Loading…
Cancel
Save