]> git.mxchange.org Git - simgear.git/commitdiff
light animation: avoid that similar effects are merged
authorFrederic Bouvier <fredfgfs01@free.fr>
Sat, 14 Apr 2012 21:16:23 +0000 (23:16 +0200)
committerFrederic Bouvier <fredfgfs01@free.fr>
Sat, 14 Apr 2012 21:16:23 +0000 (23:16 +0200)
simgear/scene/model/SGLightAnimation.cxx

index e2f25d96f346f140616f5d502651b6285f7a1021..6215efd93060bcb28c1e7aefd7fc754f924d1f6e 100644 (file)
@@ -147,6 +147,7 @@ SGLightAnimation::install(osg::Node& node)
         EffectMap::iterator iter = lightEffectMap.find(_key);
         if (iter == lightEffectMap.end()) {
             SGPropertyNode_ptr effectProp = new SGPropertyNode;
+            makeChild(effectProp, "name")->setStringValue(_key);
             makeChild(effectProp, "inherits-from")->setStringValue("Effects/light-spot");
             double dim = 1.0;
             if (_animationValue.valid())
@@ -190,6 +191,7 @@ SGLightAnimation::install(osg::Node& node)
         EffectMap::iterator iter = lightEffectMap.find(_key);
         if (iter == lightEffectMap.end()) {
             SGPropertyNode_ptr effectProp = new SGPropertyNode;
+            makeChild(effectProp, "name")->setStringValue(_key);
             makeChild(effectProp, "inherits-from")->setStringValue("Effects/light-point");
             double dim = 1.0;
             if (_animationValue.valid())