diff --git a/jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/MaterialLoader.java b/jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/MaterialLoader.java index 70a2e78a2..f7b027752 100644 --- a/jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/MaterialLoader.java +++ b/jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/MaterialLoader.java @@ -331,6 +331,7 @@ public class MaterialLoader implements AssetLoader { }else{ mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md"); } + mat.setName(matName); if (blend){ RenderState rs = mat.getAdditionalRenderState(); rs.setAlphaTest(true); diff --git a/jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/matext/MaterialExtensionLoader.java b/jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/matext/MaterialExtensionLoader.java index a16ab619a..c430abf12 100644 --- a/jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/matext/MaterialExtensionLoader.java +++ b/jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/matext/MaterialExtensionLoader.java @@ -104,6 +104,7 @@ public class MaterialExtensionLoader { } material = new Material(assetManager, matExt.getJmeMatDefName()); + material.setName(matName); for (Statement extMatStat : statement.getContents()){ readExtendingMaterialStatement(extMatStat); }