From 5f84147154572d226fbf5e373a27456ca9e9e03f Mon Sep 17 00:00:00 2001 From: shadowislord Date: Tue, 11 Nov 2014 17:55:47 -0500 Subject: [PATCH] Fix issue where loading material parameters from J3O would fail --- jme3-core/src/main/java/com/jme3/material/Material.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/material/Material.java b/jme3-core/src/main/java/com/jme3/material/Material.java index 3299f3624..4a6d04275 100644 --- a/jme3-core/src/main/java/com/jme3/material/Material.java +++ b/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);