* When a "severe" AssetNotFoundException is thrown for subassets, it won't be ignored by SceneLoader

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9739 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent 687dbb4d13
commit 06d18c1366
  1. 10
      engine/src/ogre/com/jme3/scene/plugins/ogre/SceneLoader.java

@ -302,9 +302,13 @@ public class SceneLoader extends DefaultHandler implements AssetLoader {
Spatial ogreMesh = assetManager.loadModel(meshKey);
entityNode.attachChild(ogreMesh);
} catch (AssetNotFoundException ex) {
logger.log(Level.WARNING, "Cannot locate {0} for scene {1}", new Object[]{meshKey, key});
// Attach placeholder asset.
entityNode.attachChild(PlaceholderAssets.getPlaceholderModel(assetManager));
if (ex.getMessage().equals(meshFile)) {
logger.log(Level.WARNING, "Cannot locate {0} for scene {1}", new Object[]{meshKey, key});
// Attach placeholder asset.
entityNode.attachChild(PlaceholderAssets.getPlaceholderModel(assetManager));
} else {
throw ex;
}
}
node.attachChild(entityNode);

Loading…
Cancel
Save