From 629d1caba740427b42d78145e18915759323a19f Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 9 Feb 2013 17:13:30 +0000 Subject: [PATCH] - 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 --- .../jme3/scene/plugins/blender/textures/TextureHelper.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java b/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java index 65358d4cb..8bc27e680 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java @@ -749,11 +749,16 @@ public class TextureHelper extends AbstractBlenderHelper { try { TextureKey key = new TextureKey(assetName); key.setAsCube(false); + // TODO: gather from + key.setFlipY(true); + key.setGenerateMips(true); AssetInfo info = assetManager.locateAsset(key); if (info != null) { Texture texture = assetManager.loadTexture(key); 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; } } catch (AssetNotFoundException e) {