From 60ab1ab83e1b5303556c57743134fe54bc8618a3 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Thu, 11 Mar 2010 08:45:58 +0100 Subject: [PATCH] bug fix to animated effect parameters Some confusion in getting the right property node. --- simgear/scene/material/Effect.cxx | 3 +-- simgear/scene/material/EffectBuilder.hxx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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);