Show the affected file when displaying an animation error or warning
This commit is contained in:
@@ -426,6 +426,7 @@ struct DoDrawArraysVisitor : public osg::NodeVisitor {
|
|||||||
|
|
||||||
SGAnimation::SGAnimation(simgear::SGTransientModelData &modelData) :
|
SGAnimation::SGAnimation(simgear::SGTransientModelData &modelData) :
|
||||||
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
|
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
|
||||||
|
_modelData(modelData),
|
||||||
_found(false),
|
_found(false),
|
||||||
_configNode(modelData.getConfigNode()),
|
_configNode(modelData.getConfigNode()),
|
||||||
_modelRoot(modelData.getModelRoot())
|
_modelRoot(modelData.getModelRoot())
|
||||||
@@ -456,6 +457,7 @@ SGAnimation::~SGAnimation()
|
|||||||
{
|
{
|
||||||
SG_LOG(SG_IO, SG_ALERT, "Could not find at least one of the following"
|
SG_LOG(SG_IO, SG_ALERT, "Could not find at least one of the following"
|
||||||
" objects for animation: " << info);
|
" objects for animation: " << info);
|
||||||
|
SG_LOG(SG_IO, SG_ALERT, " in file: " << _modelData.getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -771,11 +773,15 @@ bool SGAnimation::setCenterAndAxisFromObject(osg::Node *rootNode, SGVec3d& cente
|
|||||||
*/
|
*/
|
||||||
object_group->setNodeMask(0);
|
object_group->setNodeMask(0);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
SG_LOG(SG_INPUT, SG_ALERT, "Could not find a valid line segment for animation: " << axis_object_name);
|
SG_LOG(SG_INPUT, SG_ALERT, "Could not find a valid line segment for animation: " << axis_object_name);
|
||||||
|
SG_LOG(SG_IO, SG_ALERT, " in file: " << _modelData.getPath());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (can_warn)
|
else if (can_warn) {
|
||||||
SG_LOG(SG_INPUT, SG_ALERT, "Could not find at least one of the following objects for axis animation: " << axis_object_name);
|
SG_LOG(SG_INPUT, SG_ALERT, "Could not find at least one of the following objects for axis animation: " << axis_object_name);
|
||||||
|
SG_LOG(SG_IO, SG_ALERT, " in file: " << _modelData.getPath());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (axisSegment)
|
if (axisSegment)
|
||||||
{
|
{
|
||||||
@@ -2391,12 +2397,15 @@ SGTexTransformAnimation::createAnimationGroup(osg::Group& parent)
|
|||||||
appendTexRotate(*transformConfigs[i], updateCallback);
|
appendTexRotate(*transformConfigs[i], updateCallback);
|
||||||
else if (subtype == "textrapezoid")
|
else if (subtype == "textrapezoid")
|
||||||
appendTexTrapezoid(*transformConfigs[i], updateCallback);
|
appendTexTrapezoid(*transformConfigs[i], updateCallback);
|
||||||
else
|
else {
|
||||||
SG_LOG(SG_INPUT, SG_ALERT,
|
SG_LOG(SG_INPUT, SG_ALERT,
|
||||||
"Ignoring unknown texture transform subtype");
|
"Ignoring unknown texture transform subtype");
|
||||||
|
SG_LOG(SG_IO, SG_ALERT, " in file: " << _modelData.getPath());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SG_LOG(SG_INPUT, SG_ALERT, "Ignoring unknown texture transform type");
|
SG_LOG(SG_INPUT, SG_ALERT, "Ignoring unknown texture transform type");
|
||||||
|
SG_LOG(SG_IO, SG_ALERT, " in file: " << _modelData.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
texMat->setUpdateCallback(updateCallback);
|
texMat->setUpdateCallback(updateCallback);
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ protected:
|
|||||||
|
|
||||||
const SGCondition* getCondition() const;
|
const SGCondition* getCondition() const;
|
||||||
|
|
||||||
|
simgear::SGTransientModelData &_modelData;
|
||||||
std::list<std::string> _objectNames;
|
std::list<std::string> _objectNames;
|
||||||
private:
|
private:
|
||||||
void installInGroup(const std::string& name, osg::Group& group,
|
void installInGroup(const std::string& name, osg::Group& group,
|
||||||
|
|||||||
Reference in New Issue
Block a user