[blend_info] Use Rust to inspect Blender files

Kind of OT, but maybe interesting for some of you:

https://www.janwalter.org/jekyll/blender/rust/blendinfo/2019/05/28/blend_info.html

I don’t know where this is leading to (the plan is to render Blender binary files directly with my own renderer at some point), but I thought it might grow into a tool to inspect Blender files from the command line, and that could be useful for other developers too … Or is something like that existing already? That would be good to know as well …

3 Likes

Interesting. There’s something like this in Python:
https://developer.blender.org/source/blender-file/repository/master/

Note that we reserve the right to modify the .blend file format at any time. Not being able to do that would constrain improving and optimizing Blender too much. But that also means it’s not a stable base to build on, which may be OK depending on the use case.

Was interested in something similar but decided to design my own Json based file format, where Json is used also as a sort of scripting language inside the file to describe the scene and import other Json files cause I favor a multi file format instead of single file format that blend file is. Of course my intention is not to replace the blend file but rather augment it. With the possibility of a single file export in the form of 7zip which Blender already supports. The implementation currently is pure python and is focused on the needs of my project which currently is more GUI based. Python supports Json parsing and generation outside the box.

Hey there!

A bit late, but was interested with your article.
If you only know serde from the rust ecosystem, that’s already great, but have you had a look at kaitai struct which could help for deserializing and interacting with the blender file format?
https://ide.kaitai.io/
https://doc.kaitai.io/

Also your book looks like a blessing, will give it a try, thank you very much!

https://www.pbr-book.org/3ed-2018/contents
Will keep an eye on your codeberg!