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:
parent
3a0ae3df58
commit
c0e8dd97ae
@ -614,10 +614,10 @@ initFromParameters(Effect* effect, const SGPropertyNode* prop, ObjType* obj,
|
|||||||
const SGPropertyNode* valProp = getEffectPropertyNode(effect, prop);
|
const SGPropertyNode* valProp = getEffectPropertyNode(effect, prop);
|
||||||
if (!valProp)
|
if (!valProp)
|
||||||
return;
|
return;
|
||||||
setDynamicVariance(obj);
|
|
||||||
if (valProp->nChildren() == 0) {
|
if (valProp->nChildren() == 0) {
|
||||||
setter(obj, valProp->getValue<OSGParamType>());
|
setter(obj, valProp->getValue<OSGParamType>());
|
||||||
} else {
|
} else {
|
||||||
|
setDynamicVariance(obj);
|
||||||
std::string propName = getGlobalProperty(valProp, options);
|
std::string propName = getGlobalProperty(valProp, options);
|
||||||
ScalarChangeListener<OSGParamType, ObjType, F>* listener
|
ScalarChangeListener<OSGParamType, ObjType, F>* listener
|
||||||
= new ScalarChangeListener<OSGParamType, ObjType, F>(obj, setter,
|
= 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);
|
const SGPropertyNode* valProp = getEffectPropertyNode(effect, prop);
|
||||||
if (!valProp)
|
if (!valProp)
|
||||||
return;
|
return;
|
||||||
setDynamicVariance(obj);
|
|
||||||
if (valProp->nChildren() == 0) { // Has <use>?
|
if (valProp->nChildren() == 0) { // Has <use>?
|
||||||
setter(obj, Bridge<OSGParamType>::get(valProp->getValue<sg_type>()));
|
setter(obj, Bridge<OSGParamType>::get(valProp->getValue<sg_type>()));
|
||||||
} else {
|
} else {
|
||||||
|
setDynamicVariance(obj);
|
||||||
std::vector<std::string> paramNames
|
std::vector<std::string> paramNames
|
||||||
= getVectorProperties(valProp, options,numComponents, nameItr);
|
= getVectorProperties(valProp, options,numComponents, nameItr);
|
||||||
if (paramNames.empty())
|
if (paramNames.empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user