From: Tim Moore Date: Mon, 6 Aug 2012 08:58:51 +0000 (+0200) Subject: change dynamic variance of effect attributes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c0e8dd97ae6452804d5511c06b90ed0f4e99a9d6;p=simgear.git 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. --- diff --git a/simgear/scene/material/EffectBuilder.hxx b/simgear/scene/material/EffectBuilder.hxx index 3447024f..949b5f4e 100644 --- a/simgear/scene/material/EffectBuilder.hxx +++ b/simgear/scene/material/EffectBuilder.hxx @@ -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()); } else { + setDynamicVariance(obj); std::string propName = getGlobalProperty(valProp, options); ScalarChangeListener* listener = new ScalarChangeListener(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 ? setter(obj, Bridge::get(valProp->getValue())); } else { + setDynamicVariance(obj); std::vector paramNames = getVectorProperties(valProp, options,numComponents, nameItr); if (paramNames.empty())