fixed a problem with converting blend file when there are unsupported textures.

fix-456
javasabr 8 years ago
parent b35cbd5580
commit 0e340416fd
  1. 7
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/TextureHelper.java

@ -42,6 +42,7 @@ import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import com.jme3.asset.AssetInfo; import com.jme3.asset.AssetInfo;
import com.jme3.asset.AssetLoadException;
import com.jme3.asset.AssetManager; import com.jme3.asset.AssetManager;
import com.jme3.asset.AssetNotFoundException; import com.jme3.asset.AssetNotFoundException;
import com.jme3.asset.BlenderKey; import com.jme3.asset.BlenderKey;
@ -486,7 +487,7 @@ public class TextureHelper extends AbstractBlenderHelper {
key.setGenerateMips(generateMipmaps); key.setGenerateMips(generateMipmaps);
result = assetManager.loadTexture(key); result = assetManager.loadTexture(key);
result.setKey(key); result.setKey(key);
} catch (AssetNotFoundException e) { } catch (AssetNotFoundException | AssetLoadException e) {
LOGGER.fine(e.getLocalizedMessage()); LOGGER.fine(e.getLocalizedMessage());
} }
} else { } else {
@ -522,7 +523,7 @@ public class TextureHelper extends AbstractBlenderHelper {
// If texture is found return it; // If texture is found return it;
return result; return result;
} }
} catch (AssetNotFoundException e) { } catch (AssetNotFoundException | AssetLoadException e) {
LOGGER.fine(e.getLocalizedMessage()); LOGGER.fine(e.getLocalizedMessage());
} }
} }
@ -532,7 +533,7 @@ public class TextureHelper extends AbstractBlenderHelper {
try { try {
TextureKey key = new TextureKey(name); TextureKey key = new TextureKey(name);
assetManager.loadTexture(key); assetManager.loadTexture(key);
} catch (AssetNotFoundException e) { } catch (AssetNotFoundException | AssetLoadException e) {
LOGGER.fine(e.getLocalizedMessage()); LOGGER.fine(e.getLocalizedMessage());
} }
} }

Loading…
Cancel
Save