From: Tim Moore Date: Thu, 11 Mar 2010 07:45:58 +0000 (+0100) Subject: bug fix to animated effect parameters X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=60ab1ab83e1b5303556c57743134fe54bc8618a3;p=simgear.git bug fix to animated effect parameters Some confusion in getting the right property node. --- 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);