Fix to texture loading: catching asset's manager AssetNotFoundException.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7690 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
f230997d93
commit
c30288febf
@ -40,6 +40,7 @@ import java.nio.ByteBuffer;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.jme3.asset.AssetNotFoundException;
|
||||
import com.jme3.asset.TextureKey;
|
||||
import com.jme3.math.FastMath;
|
||||
import com.jme3.scene.plugins.blender.data.FileBlockHeader;
|
||||
@ -1614,8 +1615,12 @@ public class TextureHelper extends AbstractBlenderHelper {
|
||||
}
|
||||
|
||||
TextureKey texKey = new TextureKey(name, false);
|
||||
try {
|
||||
Texture tex = dataRepository.getAssetManager().loadTexture(texKey);
|
||||
image = tex.getImage();
|
||||
} catch (AssetNotFoundException e) {
|
||||
LOGGER.warning("Asset nof found: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Try using the direct path from the blender file
|
||||
|
Loading…
x
Reference in New Issue
Block a user