From a724165a338934019f709efb84fc85b8a347bf52 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Wed, 6 Apr 2011 02:56:57 +0000 Subject: [PATCH] - update MaterialEditor to use getValueAsString() git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7200 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../jme3/gde/materials/EditableMaterialFile.java | 2 +- .../com/jme3/gde/materials/MaterialProperty.java | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materials/EditableMaterialFile.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materials/EditableMaterialFile.java index 20d0c6d3b..c743d10d8 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materials/EditableMaterialFile.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materials/EditableMaterialFile.java @@ -42,7 +42,7 @@ public class EditableMaterialFile { private List matDefEntries = new ArrayList(); private ProjectAssetManager manager; private FileSystem fs; - public static final String[] variableTypes = new String[]{"Int", "Boolean", "Float", "Vector2", "Vector3", "Vector4", "Color", "Texture2D", "TextureCubeMap"}; + public static final String[] variableTypes = new String[]{"Int", "Boolean", "Float", "Vector2", "Vector3", "Vector4", "Color", "Texture2D", "Texture3D", "TextureArray", "TextureBuffer", "TextureCubeMap"}; public EditableMaterialFile(FileObject material, ProjectAssetManager manager) { this.material = material; diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialProperty.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialProperty.java index 0ac3459ae..0a1d501cf 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialProperty.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialProperty.java @@ -33,21 +33,7 @@ public class MaterialProperty { this.type = param.getVarType().name(); this.name = param.getName(); Object obj = param.getValue(); - this.value = obj.toString(); - //TODO: change to correct string - if (obj instanceof ColorRGBA) { - value = value.replaceAll("Color\\[([^\\]]*)\\]", "$1"); - value = value.replaceAll(",", ""); - } else if (obj instanceof Texture2D) { - AssetKey key = ((Texture2D) obj).getKey(); - String flip = ""; - if (key instanceof TextureKey) { - if (((TextureKey) key).isFlipY()) { - flip = "Flip "; - } - } - value = value.replaceAll("Texture2D\\[name=([^,]*)\\,([^\\]]*)]", flip + "$1"); - } + this.value = param.getValueAsString(); } /**