diff --git a/simgear/scene/material/Effect.cxx b/simgear/scene/material/Effect.cxx index 400e350a..f2bcbcdc 100644 --- a/simgear/scene/material/Effect.cxx +++ b/simgear/scene/material/Effect.cxx @@ -829,8 +829,7 @@ struct UniformBuilder :public PassAttributeBuilder return; const SGPropertyNode* nameProp = prop->getChild("name"); const SGPropertyNode* typeProp = prop->getChild("type"); - const SGPropertyNode* valProp - = getEffectPropertyChild(effect, prop, "value"); + const SGPropertyNode* valProp = prop->getChild("value"); string name; Uniform::Type uniformType = Uniform::FLOAT; if (nameProp) { diff --git a/simgear/scene/material/EffectBuilder.hxx b/simgear/scene/material/EffectBuilder.hxx index 54e959a1..e9c7b6a9 100644 --- a/simgear/scene/material/EffectBuilder.hxx +++ b/simgear/scene/material/EffectBuilder.hxx @@ -594,7 +594,7 @@ initFromParameters(Effect* effect, const SGPropertyNode* prop, ObjType* obj, if (valProp->nChildren() == 0) { setter(obj, valProp->getValue()); } else { - std::string propName = getGlobalProperty(prop, options); + std::string propName = getGlobalProperty(valProp, options); ScalarChangeListener* listener = new ScalarChangeListener(obj, setter, propName);