change dynamic variance of effect attributes

Previously, any effect attribute that was set via effect parameters i.e., was
not a constant value, was marked with data variance DYNAMIC. Now, only
attributes that get their values from the property tree are so marked.
This commit is contained in:
Tim Moore 2012-08-06 10:58:51 +02:00
parent 3a0ae3df58
commit c0e8dd97ae

View File

@ -614,10 +614,10 @@ initFromParameters(Effect* effect, const SGPropertyNode* prop, ObjType* obj,
const SGPropertyNode* valProp = getEffectPropertyNode(effect, prop);
if (!valProp)
return;
setDynamicVariance(obj);
if (valProp->nChildren() == 0) {
setter(obj, valProp->getValue<OSGParamType>());
} else {
setDynamicVariance(obj);
std::string propName = getGlobalProperty(valProp, options);
ScalarChangeListener<OSGParamType, ObjType, F>* listener
= new ScalarChangeListener<OSGParamType, ObjType, F>(obj, setter,
@ -667,10 +667,10 @@ initFromParameters(Effect* effect, const SGPropertyNode* prop, ObjType* obj,
const SGPropertyNode* valProp = getEffectPropertyNode(effect, prop);
if (!valProp)
return;
setDynamicVariance(obj);
if (valProp->nChildren() == 0) { // Has <use>?
setter(obj, Bridge<OSGParamType>::get(valProp->getValue<sg_type>()));
} else {
setDynamicVariance(obj);
std::vector<std::string> paramNames
= getVectorProperties(valProp, options,numComponents, nameItr);
if (paramNames.empty())