         {
             for (uint i = 0; i < materialNames.length; ++i)
                 ConvertMaterial(materialNames[i], filePath, convertedMaterials);
-            
+
             ConvertModel(meshName, filePath, convertedMeshes);
             ConvertModel(collisionMeshName, filePath, convertedMeshes);
 

            if (!meshName.empty)
            {
                StaticModel@ model = newNode.CreateComponent("StaticModel");
                model.model = cache.GetResource("Model", "Models/" + meshName.Replaced(".mesh", ".mdl"));
                model.drawDistance = drawDistance;
                model.castShadows = castShadows;
                // Set default grey material to match Tundra defaults

            return;
    }

    String convertedModelName = filePath + modelName + ".xml";

    // Convert .mesh to .mesh.xml
    String cmdLine = "ogrexmlconverter.exe \"" + filePath + modelName + "\" \"" + convertedModelName + "\"";
    if (!fileSystem.FileExists(convertedModelName))
        fileSystem.SystemCommand(cmdLine.Replaced('/', '\\'));

    // Convert .mesh.xml to .mdl
    Array<String> args;
    args.Push("\"" + filePath + modelName + ".xml\"");
    args.Push("\"" + sceneResourcePath + "Models/" + GetFileNameAndExtension(modelName).Replaced(".mesh", ".mdl") + "\"");
    args.Push("-a");
    fileSystem.SystemRun(fileSystem.programDir + "OgreImporter.exe", args);

    convertedModels.Push(modelName);
}

