mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-26 06:45:36 +00:00
error string interpreter, example of usage in shapebase::preload, plus flips the datablock filter back on to save some network bandwidth.
This commit is contained in:
parent
220771d2fe
commit
8bb43dd5ae
5 changed files with 68 additions and 22 deletions
|
|
@ -113,6 +113,15 @@ ConsoleSetType(TypeShapeAssetId)
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
const String ShapeAsset::mErrCodeStrings[] =
|
||||
{
|
||||
"TooManyVerts",
|
||||
"TooManyBones",
|
||||
"MissingAnimatons",
|
||||
"UnKnown"
|
||||
};
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ShapeAsset::ShapeAsset()
|
||||
{
|
||||
mFileName = StringTable->EmptyString();
|
||||
|
|
|
|||
|
|
@ -87,7 +87,16 @@ public:
|
|||
{
|
||||
TooManyVerts = AssetErrCode::Extended,
|
||||
TooManyBones,
|
||||
MissingAnimatons
|
||||
MissingAnimatons,
|
||||
Extended
|
||||
};
|
||||
|
||||
static const String mErrCodeStrings[ShapeAssetErrCode::Extended - Parent::Extended + 1];
|
||||
static String getAssetErrstrn(U32 errCode)
|
||||
{
|
||||
if (errCode < Parent::Extended) return Parent::getAssetErrstrn(errCode);
|
||||
if (errCode > ShapeAssetErrCode::Extended) return "undefined error";
|
||||
return mErrCodeStrings[errCode];
|
||||
};
|
||||
|
||||
ShapeAsset();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue