bug fix to animated effect parameters
Some confusion in getting the right property node.
This commit is contained in:
parent
93c2f70b64
commit
60ab1ab83e
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user