Hey guys. I’m made a start on a c++ .blend import library to use in C++ applications.
I’ve been studying the file format as explained here: http://www.atmind.nl/blender/mystery_ot_blend.html
I’ve managed to retrieve the file header information. I’m stuck on the the file-blocks though. I’m managing to get the first file-block ‘code’, but I’m struggling to get the file block size.
Anybody know where I might be going wrong with my code?
//Read file block code
char* buffer = new char[5];
buffer[4] = '\0';
inFile.seekg(iBufferStart, std::ios_base::beg);
inFile.read(buffer, 4);
std::cout << "Code: " << buffer << "
";
delete buffer;
//Read file block data size
char* intBuffer = new char[5];
buffer[4] = '\0';
inFile.seekg(iBufferStart + 4, std::ios_base::beg);
inFile.read(intBuffer, 4);
std::cout << "Size: " << intBuffer << "
";
delete intBuffer;