]> git.mxchange.org Git - simgear.git/commitdiff
Add file name to error message.
authorThorstenB <brehmt@gmail.com>
Wed, 28 Mar 2012 20:54:27 +0000 (22:54 +0200)
committerThorstenB <brehmt@gmail.com>
Wed, 28 Mar 2012 20:54:27 +0000 (22:54 +0200)
simgear/scene/model/SGMaterialAnimation.cxx
simgear/scene/model/SGMaterialAnimation.hxx
simgear/scene/model/animation.cxx

index bec77fa5570f7711e5bb51481902898a7e5e96f1..cc5c660c6ae93355779e3f8600e1e6c2791b3f0c 100644 (file)
@@ -413,13 +413,14 @@ private:
 SGMaterialAnimation::SGMaterialAnimation(const SGPropertyNode* configNode,
                                          SGPropertyNode* modelRoot,
                                          const osgDB::Options*
-                                         options) :
+                                         options, const string &path) :
   SGAnimation(configNode, modelRoot),
   texturePathList(options->getDatabasePathList())
 {
   if (configNode->hasChild("global"))
-    SG_LOG(SG_IO, SG_ALERT, "Use of <global> in material animation is "
-           "no longer supported");
+    SG_LOG(SG_IO, SG_ALERT, path <<
+           ": Use of <global> in material animation is "
+           "no longer supported.");
 }
 
 osg::Group*
index 54d1b15b3120909e001ccfc450740a3ab3cd2592..1fe5da8ddc90424f75317e88c4960bf0828df9a8 100644 (file)
@@ -23,7 +23,7 @@ class SGMaterialAnimation : public SGAnimation {
 public:
   SGMaterialAnimation(const SGPropertyNode* configNode,
                       SGPropertyNode* modelRoot,
-                      const osgDB::Options* options);
+                      const osgDB::Options* options,const string &path);
   virtual osg::Group* createAnimationGroup(osg::Group& parent);
   virtual void install(osg::Node& node);
   static SGPropertyNode_ptr makeEffectProperties(const SGPropertyNode* animProp);
index 582046ea8d952f2b8824e2642f20e59e28533bdb..7e29d5fdd933bd8de626070b9fdd12ee5d8ec9f0 100644 (file)
@@ -433,7 +433,7 @@ SGAnimation::animate(osg::Node* node, const SGPropertyNode* configNode,
     SGInteractionAnimation animInst(configNode, modelRoot);
     animInst.apply(node);
   } else if (type == "material") {
-    SGMaterialAnimation animInst(configNode, modelRoot, options);
+    SGMaterialAnimation animInst(configNode, modelRoot, options, path);
     animInst.apply(node);
   } else if (type == "noshadow") {
     SGShadowAnimation animInst(configNode, modelRoot);