- change blender texture locator to always set the texture key on loaded textures explicitly

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10376 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 12 years ago
parent 80be12661f
commit 629d1caba7
  1. 7
      engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java

@ -749,11 +749,16 @@ public class TextureHelper extends AbstractBlenderHelper {
try { try {
TextureKey key = new TextureKey(assetName); TextureKey key = new TextureKey(assetName);
key.setAsCube(false); key.setAsCube(false);
// TODO: gather from
key.setFlipY(true);
key.setGenerateMips(true);
AssetInfo info = assetManager.locateAsset(key); AssetInfo info = assetManager.locateAsset(key);
if (info != null) { if (info != null) {
Texture texture = assetManager.loadTexture(key); Texture texture = assetManager.loadTexture(key);
result = texture; result = texture;
//if texture is found return it; // Set key explicitly here if other ways fail
texture.setKey(key);
// If texture is found return it;
return result; return result;
} }
} catch (AssetNotFoundException e) { } catch (AssetNotFoundException e) {

Loading…
Cancel
Save