remap-txr-tags -- runtime reassignment of texture tag names. (Useful for splitting up tags with the same name in order to map different materials to them.)

bbox-check -- a change that allows disabling of a confusing error message.
This commit is contained in:
Marc Chapman 2017-07-27 00:15:01 +01:00
parent 5a1405d4bb
commit a64a2c9793
3 changed files with 107 additions and 1 deletions

View file

@ -20,6 +20,11 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
// Copyright (C) 2015 Faust Logic, Inc.
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
#include "platform/platform.h"
#include "materials/materialList.h"
@ -309,7 +314,12 @@ void MaterialList::mapMaterial( U32 i )
return;
}
String materialName = MATMGR->getMapEntry(matName);
String materialName;
// Skip past a leading '#' marker.
if (matName.compare("#", 1) == 0)
materialName = MATMGR->getMapEntry(matName.substr(1, matName.length()-1));
else
materialName = MATMGR->getMapEntry(matName);
// IF we didn't find it, then look for a PolyStatic generated Material
// [a little cheesy, but we need to allow for user override of generated Materials]