Added - Support for LOD meshes using _ , like LOD_0...
This commit is contained in:
@@ -1552,10 +1552,14 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options& op
|
||||
|
||||
int32 ModelTool::DetectLodIndex(const String& nodeName)
|
||||
{
|
||||
const int32 index = nodeName.FindLast(TEXT("LOD"));
|
||||
int32 index = nodeName.FindLast(TEXT("LOD"));
|
||||
if (index != -1)
|
||||
{
|
||||
int32 num;
|
||||
//PE: Many models use LOD_0... to indentify LOD levels.
|
||||
if (nodeName.Length() > 4 && nodeName[3] == '_')
|
||||
index++;
|
||||
|
||||
if (!StringUtils::Parse(nodeName.Get() + index + 3, &num))
|
||||
{
|
||||
if (num >= 0 && num < MODEL_MAX_LODS)
|
||||
|
||||
Reference in New Issue
Block a user