From 46f0f32afa3a7e0d66b0768518b216ffaf6a95b8 Mon Sep 17 00:00:00 2001 From: Nehon Date: Fri, 6 Jun 2014 20:49:15 +0200 Subject: [PATCH] Made the Material Editor properly handle the new -LINEAR statement of j3md when parsing material parameters --- .../jme3/gde/materialdefinition/utils/MaterialUtils.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/utils/MaterialUtils.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/utils/MaterialUtils.java index 36fb9f35f..5d844bd15 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/utils/MaterialUtils.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/utils/MaterialUtils.java @@ -53,9 +53,13 @@ public class MaterialUtils { * @param line * @return */ - public static String trimName(String line) { + public static String trimName(String line) { + int idx = line.indexOf("-"); + if(idx!=-1){ + line= line.substring(0, idx); + } line = trimLine(line); - int idx = line.indexOf("("); + idx = line.indexOf("("); if (idx == -1) { idx = line.indexOf(":"); }