From c0e8dd97ae6452804d5511c06b90ed0f4e99a9d6 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 6 Aug 2012 10:58:51 +0200 Subject: [PATCH] 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. --- simgear/scene/material/EffectBuilder.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()) -- 2.39.5