- add fallback to default material name also when using OgreMeshKey

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8108 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent fab0c6d73c
commit b78b994242
  1. 3
      engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java

@ -785,6 +785,9 @@ public class MeshLoader extends DefaultHandler implements AssetLoader {
if (materialList == null && materialName != null) {
materialList = (MaterialList) assetManager.loadAsset(new OgreMaterialKey(folderName + materialName + ".material"));
}
else{
materialList = (MaterialList) assetManager.loadAsset(new OgreMaterialKey(folderName + meshName + ".material"));
}
} else {
try {
materialList = (MaterialList) assetManager.loadAsset(new OgreMaterialKey(folderName + meshName + ".material"));

Loading…
Cancel
Save