I am attempting to parse a .blend (Blender 3D Modelling Program Save File) in C#.
.blend follows a TLV pattern and using 3rd party tools I've managed to extract the majority of the data:
Shown in the image; I have deserialized the .blend FileBlocks (The actual file data) and the Sdna Structs (The types of data present in a .blend file)
For example Block[1799] is sdna type sdnas[173] which means Block[1799] is a mesh.
Each block has a property "Body" which is a System.Byte[] and contains that FileBlocks data (In the case of a mesh, it's name and mesh properties, with pointers to other file blocks like it's vertices)
In this particular case I'm reading the body of a "Vec2s" sdna struct where the first 4 bytes are [31,5,246,25...]
I also know the Vec2 sdna has 2 properties (x and y) which are both of type short. So my intuition tells me that the first 4 bytes of my object are 2 shorts representing x and y. Reading these out returns (1311,9206)
All the fields of the sdna structs are of type uint, short etc. So how am I supposed to get the actual values like names, floats, vector2s, pointers etc?
As you can tell I really don't know what I'm doing.