diff --git a/Obj2Tiles/Obj2Tiles.csproj b/Obj2Tiles/Obj2Tiles.csproj index 0f1552d..b122bb4 100644 --- a/Obj2Tiles/Obj2Tiles.csproj +++ b/Obj2Tiles/Obj2Tiles.csproj @@ -6,8 +6,8 @@ enable enable false - 1.0.11 - 1.0.11 + 1.0.12 + 1.0.12 true diff --git a/Obj2Tiles/Utils.cs b/Obj2Tiles/Utils.cs index 1df8bf3..3e8f410 100644 --- a/Obj2Tiles/Utils.cs +++ b/Obj2Tiles/Utils.cs @@ -34,74 +34,76 @@ private static IEnumerable GetMtlDependencies(string mtlPath) var mtlFile = File.ReadAllLines(mtlPath); var dependencies = new List(); - foreach (var line in mtlFile) { - if (line.Trim().StartsWith("map_Kd")) + + var trimmedLine = line.Trim(); + + if (trimmedLine.StartsWith("map_Kd")) { dependencies.Add(line[7..].Trim()); continue; } - if (line.Trim().StartsWith("map_Ka")) + if (trimmedLine.StartsWith("map_Ka")) { dependencies.Add(line[7..].Trim()); continue; } - if (line.Trim().StartsWith("norm")) + if (trimmedLine.StartsWith("norm")) { dependencies.Add(line[5..].Trim()); continue; } - if (line.Trim().StartsWith("map_Ks")) + if (trimmedLine.StartsWith("map_Ks")) { dependencies.Add(line[7..].Trim()); continue; } - if (line.Trim().StartsWith("map_Bump")) + if (trimmedLine.StartsWith("map_Bump")) { dependencies.Add(line[8..].Trim()); continue; } - if (line.Trim().StartsWith("map_d")) + if (trimmedLine.StartsWith("map_d")) { dependencies.Add(line[6..].Trim()); continue; } - if (line.Trim().StartsWith("map_Ns")) + if (trimmedLine.StartsWith("map_Ns")) { dependencies.Add(line[7..].Trim()); continue; } - if (line.Trim().StartsWith("bump")) + if (trimmedLine.StartsWith("bump")) { dependencies.Add(line[5..].Trim()); continue; } - if (line.Trim().StartsWith("disp")) + if (trimmedLine.StartsWith("disp")) { dependencies.Add(line[5..].Trim()); continue; } - if (line.Trim().StartsWith("decal")) + if (trimmedLine.StartsWith("decal")) { dependencies.Add(line[6..].Trim());