]> git.mxchange.org Git - simgear.git/commitdiff
bug fix to animated effect parameters
authorTim Moore <timoore33@gmail.com>
Thu, 11 Mar 2010 07:45:58 +0000 (08:45 +0100)
committerTim Moore <timoore33@gmail.com>
Thu, 11 Mar 2010 07:45:58 +0000 (08:45 +0100)
Some confusion in getting the right property node.

simgear/scene/material/Effect.cxx
simgear/scene/material/EffectBuilder.hxx

index 400e350a5d0b7fb5d123ca309b05e36c00e29ff1..f2bcbcdc619cbbba615011667e3de8b80a0be6cf 100644 (file)
@@ -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) {
index 54e959a14b9ea3008b5d1c96087a6918ff4df4a7..e9c7b6a97426c1a6726d671c9b9475115a642893 100644 (file)
@@ -594,7 +594,7 @@ initFromParameters(Effect* effect, const SGPropertyNode* prop, ObjType* obj,
     if (valProp->nChildren() == 0) {
         setter(obj, valProp->getValue<OSGParamType>());
     } else {
-        std::string propName = getGlobalProperty(prop, options);
+        std::string propName = getGlobalProperty(valProp, options);
         ScalarChangeListener<OSGParamType, ObjType, F>* listener
             = new ScalarChangeListener<OSGParamType, ObjType, F>(obj, setter,
                                                                  propName);