Merge branch 'tmj-dev' into milek-dev

This commit is contained in:
milek7
2018-10-01 21:00:27 +02:00
47 changed files with 1674 additions and 972 deletions

View File

@@ -136,7 +136,7 @@ int TSubModel::Load( cParser &parser, TModel3d *Model, /*int Pos,*/ bool dynamic
iVboPtr = Pos; // pozycja w VBO
*/
if (!parser.expectToken("type:"))
Error("Model type parse failure!");
ErrorLog("Bad model: expected submodel type definition not found while loading model \"" + Model->NameGet() + "\"" );
{
std::string type = parser.getToken<std::string>();
if (type == "mesh")
@@ -1233,8 +1233,10 @@ bool TModel3d::LoadFromFile(std::string const &FileName, bool dynamic)
}
*/
auto const name { FileName };
// cache the file name, in case someone wants it later
m_filename = name;
asBinary = name + ".e3d";
asBinary = name + ".e3d";
if (FileExists(asBinary))
{
LoadFromBinFile(asBinary, dynamic);
@@ -1252,8 +1254,6 @@ bool TModel3d::LoadFromFile(std::string const &FileName, bool dynamic)
}
}
}
// cache the file name, in case someone wants it later
m_filename = name;
bool const result =
Root ? (iSubModelsCount > 0) : false; // brak pliku albo problem z wczytaniem
if (false == result)