             return;
     }
 
+    String convertedModelName = filePath + modelName + ".xml";
+
     // Convert .mesh to .mesh.xml
-    String cmdLine = "ogrexmlconverter.exe \"" + filePath + modelName + "\" \"" + filePath + modelName + ".xml\"";
-    fileSystem.SystemCommand(cmdLine.Replaced('/', '\\'));
+    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/" + modelName.Replaced(".mesh", ".mdl") + "\"");
+    args.Push("\"" + sceneResourcePath + "Models/" + GetFileNameAndExtension(modelName).Replaced(".mesh", ".mdl") + "\"");
     args.Push("-a");
     fileSystem.SystemRun(fileSystem.programDir + "OgreImporter.exe", args);
-    
+
     convertedModels.Push(modelName);
 }
 

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


                // Then try to assign the actual materials
                for (uint i = 0; i < materialNames.length; ++i)
                {
                    Material@ mat = cache.GetResource("Material", "Materials/" + GetFileNameAndExtension(materialNames[i]).Replaced(".material", ".xml"));
                    if (mat !is null)
                        model.materials[i] = mat;
                }
