Skip to main content

euv_core/game/engine3d/blend/
enum.rs

1/// Outer container compression detected on a `.blend` binary file.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
3pub enum BlendCompression {
4    /// Raw uncompressed `.blend` starting directly with `BLENDER`.
5    #[default]
6    None,
7    /// RFC 1952 Gzip-compressed `.blend` (`0x1F 0x8B`), decoded natively via pure-Rust `inflate_gzip`.
8    Gzip,
9    /// Zstandard-compressed `.blend` (`0x28 0xB5 0x2F 0xFD`, Blender 3.0+ default compressed save).
10    Zstd,
11}
12
13/// High-level Blender ID data-block classification extracted from 4-byte `BHead::code`.
14#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
15pub enum BlendBlockKind {
16    /// Scene (`SC`).
17    Scene,
18    /// Collection / Group (`GR`).
19    Collection,
20    /// Scene Object (`OB`).
21    Object,
22    /// Mesh Geometry (`ME`).
23    Mesh,
24    /// Principled/Node Material (`MA`).
25    Material,
26    /// Camera (`CA`).
27    Camera,
28    /// Light / Lamp (`LA`).
29    Light,
30    /// Skeletal Armature (`AR`).
31    Armature,
32    /// Animation Action (`AC`).
33    Action,
34    /// Image Texture (`IM`).
35    Image,
36    /// Shader/Geometry Node Tree (`NT`).
37    NodeTree,
38    /// SDNA Schema Block (`DNA1`).
39    DnaSchema,
40    /// Stream Terminator (`ENDB`).
41    EndOfFile,
42    /// Generic or auxiliary data block (`DATA`, `GLOB`, `REND`, `TEST`, etc.).
43    Other,
44}