From e084c2baf15991ce8e69b62b44cb61fc6eb6e806 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sun, 24 Jul 2011 18:22:05 +0000 Subject: [PATCH] - fix Material Editor j3m path setting git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7911 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/com/jme3/gde/materials/MaterialPropertyEditor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialPropertyEditor.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialPropertyEditor.java index a93750370..6a05bcaaf 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialPropertyEditor.java +++ b/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());