Browse Source

Fix issue where loading material parameters from J3O would fail

shadowislord 10 years ago
parent
commit
5f84147154
1 changed files with 3 additions and 3 deletions
  1. 3 3
      jme3-core/src/main/java/com/jme3/material/Material.java

+ 3 - 3
jme3-core/src/main/java/com/jme3/material/Material.java

@@ -1325,9 +1325,9 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
                 param.setName(param.getName().substring(2));
             }
             
-            if (def.getMaterialParam(name) == null) {
-                logger.log(Level.WARNING, "The material parameter is not defined: " + 
-                                          name + ". Ignoring..");
+            if (def.getMaterialParam(param.getName()) == null) {
+                logger.log(Level.WARNING, "The material parameter is not defined: {0}. Ignoring..", 
+                                          param.getName());
             } else {
                 checkSetParam(param.getVarType(), param.getName());
                 paramValues.put(param.getName(), param);