Blender Loader:

- try locating textures without causing AssetNotFoundExceptions

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10196 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
nor..67 2013-01-27 02:37:05 +00:00
parent 6bc4b2131a
commit ed001d4e33

View File

@ -31,6 +31,7 @@
*/
package com.jme3.scene.plugins.blender.textures;
import com.jme3.asset.AssetInfo;
import java.awt.color.ColorSpace;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
@ -715,9 +716,12 @@ public class TextureHelper extends AbstractBlenderHelper {
TextureKey key = new TextureKey(assetName);
key.setGenerateMips(true);
key.setAsCube(false);
AssetInfo info = assetManager.locateAsset(key);
if(info != null){
result = assetManager.loadTexture(key);
break;// if no exception is thrown then accept the located asset
// and break the loop
}
} catch (AssetNotFoundException e) {
LOGGER.fine(e.getLocalizedMessage());
}