From b78b994242a0911367ea7f414bfaf078fdcb0621 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Fri, 26 Aug 2011 02:11:17 +0000 Subject: [PATCH] - 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 --- engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java b/engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java index 88bc99518..460ee4321 100644 --- a/engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java +++ b/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"));