- fix Material Editor j3m path setting

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7911 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent 06e04c429c
commit e084c2baf1
  1. 3
      sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialPropertyEditor.java

@ -41,6 +41,7 @@ import com.jme3.gde.core.sceneexplorer.nodes.AbstractSceneExplorerNode;
import com.jme3.gde.core.properties.SceneExplorerProperty;
import com.jme3.gde.core.properties.SceneExplorerPropertyEditor;
import com.jme3.material.Material;
import com.jme3.asset.MaterialKey;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Rectangle;
@ -116,7 +117,7 @@ public class MaterialPropertyEditor implements PropertyEditor, SceneExplorerProp
}
newFile = currentFolder.createData(currentFile.getName() + "_" + i, "j3m");
EditableMaterialFile properties = new EditableMaterialFile(newFile, pm);
material.setAssetName(pm.getRelativeAssetPath(newFile.getPath()));
material.setKey(new MaterialKey(pm.getRelativeAssetPath(newFile.getPath())));
properties.setAsMaterial(material);
currentFolder.refresh();
applyMaterial(material.getAssetName());

Loading…
Cancel
Save