Make warnings and alerts a single message for DEV_WARN and DEV_ALERT since they will result in a popu-dialog message

This commit is contained in:
Erik Hofman
2020-03-15 14:33:05 +01:00
parent 1fa48e7edb
commit edae7a2b75
+5 -10
View File
@@ -456,8 +456,7 @@ SGAnimation::~SGAnimation()
if (!info.empty()) if (!info.empty())
{ {
SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find at least one of the following" SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find at least one of the following"
" objects for animation: " << info); " objects for animation: " << info << " in file: " << _modelData.getPath());
SG_LOG(SG_IO, SG_DEV_ALERT, " in file: " << _modelData.getPath());
} }
} }
} }
@@ -774,13 +773,11 @@ bool SGAnimation::setCenterAndAxisFromObject(osg::Node *rootNode, SGVec3d& cente
object_group->setNodeMask(0); object_group->setNodeMask(0);
} }
else { else {
SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find a valid line segment for animation: " << axis_object_name); SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find a valid line segment for animation: " << axis_object_name << " in file: " << _modelData.getPath());
SG_LOG(SG_IO, SG_DEV_ALERT, " in file: " << _modelData.getPath());
} }
} }
else if (can_warn) { else if (can_warn) {
SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find at least one of the following objects for axis animation: " << axis_object_name); SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find at least one of the following objects for axis animation: " << axis_object_name << " in file: " << _modelData.getPath());
SG_LOG(SG_IO, SG_DEV_ALERT, " in file: " << _modelData.getPath());
} }
} }
if (axisSegment) if (axisSegment)
@@ -2399,13 +2396,11 @@ SGTexTransformAnimation::createAnimationGroup(osg::Group& parent)
appendTexTrapezoid(*transformConfigs[i], updateCallback); appendTexTrapezoid(*transformConfigs[i], updateCallback);
else { else {
SG_LOG(SG_IO, SG_DEV_ALERT, SG_LOG(SG_IO, SG_DEV_ALERT,
"Ignoring unknown texture transform subtype"); "Ignoring unknown texture transform subtype in file: " << _modelData.getPath());
SG_LOG(SG_IO, SG_DEV_ALERT, " in file: " << _modelData.getPath());
} }
} }
} else { } else {
SG_LOG(SG_IO, SG_DEV_ALERT, "Ignoring unknown texture transform type"); SG_LOG(SG_IO, SG_DEV_ALERT, "Ignoring unknown texture transform type in file: " << _modelData.getPath());
SG_LOG(SG_IO, SG_DEV_ALERT, " in file: " << _modelData.getPath());
} }
texMat->setUpdateCallback(updateCallback); texMat->setUpdateCallback(updateCallback);