From 55db59d510a36b6d5426f878248d351a782225a6 Mon Sep 17 00:00:00 2001 From: Nehon Date: Sat, 15 Aug 2015 10:30:12 +0200 Subject: [PATCH] Fixed an issue in the shader node editor where the editor was failing to open a definition when a variable name began with m_ --- .../jme3/gde/materialdefinition/editor/NodePanel.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/NodePanel.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/NodePanel.java index 540ce9742..adfd9223d 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/NodePanel.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/NodePanel.java @@ -169,9 +169,12 @@ public class NodePanel extends DraggablePanel implements Selectable, PropertyCha } private Dot getConnectPoint(List list, String varName, List listDot) { - if (varName.startsWith("m_") || varName.startsWith("g_")) { - varName = varName.substring(2); - } + //This has been commented out because it was causing issues when a variable name was explicitely starting with m_ or g_ in the j3md. + //I can't remember why it was done in the first place, but I can't see any case where the m_ should be stripped out. + //I'm letting this commented in case this comes to light some day, and something more clever will have to be done. +// if (varName.startsWith("m_") || varName.startsWith("g_")) { +// varName = varName.substring(2); +// } for (int i = 0; i < list.size(); i++) { if (list.get(i).getText().equals(varName)) { return listDot.get(i);