Add information

This commit is contained in:
jordan4ibanez 2023-11-28 05:11:40 -05:00
parent 58e058143c
commit 89ae5f0068
1 changed files with 5 additions and 0 deletions

View File

@ -185,6 +185,9 @@ bool load(json data) {
return true;
}
/**
* Automatically cleans and returns the nullptr so it can be inlined or chained.
*/
CSkinnedMesh* CB3DJSONMeshFileLoader::cleanUp(std::string failure) {
os::Printer::log(failure.c_str(), ELL_WARNING);
AnimatedMesh->drop();
@ -236,6 +239,8 @@ IAnimatedMesh* CB3DJSONMeshFileLoader::createMesh(io::IReadFile* file) {
return(this->cleanUp("B3D JSON severe error! File size is 0!"));
}
//? Now JSONDataContainer exists on this object.
//? So we can commence loading it.
// Now check some real basic elements of the JSON file.
if (!data.contains("format") || !data["format"].is_string() || data["format"] != "BB3D") {