OgreXML Loader: set jME3 material name based on ogre material name

experimental
shadowislord 10 years ago
parent 6c770d524d
commit 4090b6f1de
  1. 1
      jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/MaterialLoader.java
  2. 1
      jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/matext/MaterialExtensionLoader.java

@ -331,6 +331,7 @@ public class MaterialLoader implements AssetLoader {
}else{ }else{
mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md"); mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
} }
mat.setName(matName);
if (blend){ if (blend){
RenderState rs = mat.getAdditionalRenderState(); RenderState rs = mat.getAdditionalRenderState();
rs.setAlphaTest(true); rs.setAlphaTest(true);

@ -104,6 +104,7 @@ public class MaterialExtensionLoader {
} }
material = new Material(assetManager, matExt.getJmeMatDefName()); material = new Material(assetManager, matExt.getJmeMatDefName());
material.setName(matName);
for (Statement extMatStat : statement.getContents()){ for (Statement extMatStat : statement.getContents()){
readExtendingMaterialStatement(extMatStat); readExtendingMaterialStatement(extMatStat);
} }

Loading…
Cancel
Save