- show correct material j3m in SceneExplorer

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7184 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent 6cab407283
commit c6a3a78b1e
  1. 10
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/properties/MaterialPropertyEditor.java

@ -81,7 +81,11 @@ public class MaterialPropertyEditor implements PropertyEditor {
} }
public String getAsText() { public String getAsText() {
return material.toString(); String name = material.getAssetName();
if (name == null) {
name = "stored in file";
}
return name;
} }
public void setAsText(final String text) throws IllegalArgumentException { public void setAsText(final String text) throws IllegalArgumentException {
@ -109,7 +113,9 @@ public class MaterialPropertyEditor implements PropertyEditor {
public String[] getTags() { public String[] getTags() {
SceneRequest request = SceneApplication.getApplication().getCurrentSceneRequest(); SceneRequest request = SceneApplication.getApplication().getCurrentSceneRequest();
if(request==null) return new String[]{}; if (request == null) {
return new String[]{};
}
String[] mats = request.getManager().getMaterials(); String[] mats = request.getManager().getMaterials();
return mats; return mats;
} }

Loading…
Cancel
Save