From: ThorstenB Date: Wed, 28 Mar 2012 20:54:27 +0000 (+0200) Subject: Add file name to error message. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6fa4c7e138544a15247c6654e825d8a4697104cd;p=simgear.git Add file name to error message. --- diff --git a/simgear/scene/model/SGMaterialAnimation.cxx b/simgear/scene/model/SGMaterialAnimation.cxx index bec77fa5..cc5c660c 100644 --- a/simgear/scene/model/SGMaterialAnimation.cxx +++ b/simgear/scene/model/SGMaterialAnimation.cxx @@ -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 in material animation is " - "no longer supported"); + SG_LOG(SG_IO, SG_ALERT, path << + ": Use of in material animation is " + "no longer supported."); } osg::Group* diff --git a/simgear/scene/model/SGMaterialAnimation.hxx b/simgear/scene/model/SGMaterialAnimation.hxx index 54d1b15b..1fe5da8d 100644 --- a/simgear/scene/model/SGMaterialAnimation.hxx +++ b/simgear/scene/model/SGMaterialAnimation.hxx @@ -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); diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx index 582046ea..7e29d5fd 100644 --- a/simgear/scene/model/animation.cxx +++ b/simgear/scene/model/animation.cxx @@ -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);