Crate blend_info
source · [−]Expand description
blend_info
Print some information about a Blender scene file.
$ ./target/release/blend_info -h
blend_info 0.1.1
Print some information about a Blender scene file.
USAGE:
blend_info [FLAGS] [OPTIONS] <path>
FLAGS:
--dna Print information about Blender's DNA
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-n, --struct_name <struct-name> Print information about a particular struct
ARGS:
<path> The path to the file to read
Examples
DNA
Find Blender version and read all bytes:
$ ./target/release/blend_info --dna blend/factory_v279.blend | less
BLENDER-v279
...
459792 bytes read
$ ./target/release/blend_info --dna blend/factory_v300.blend | less
BLENDER-v300
...
806388 bytes read
Get an idea what structs might be useful and which names are defined:
$ ./target/release/blend_info --dna blend/factory_v279.blend | grep "\[SDNAnr =" -A 1
[SDNAnr = 0]
Link (len=16) {
--
[SDNAnr = 1]
LinkData (len=24) {
...
--
[SDNAnr = 620]
CacheFile (len=1200) {
Structs and their contained data
$ ./target/release/blend_info -n Camera blend/factory_v279.blend
Camera 248
struct Camera { // SDNAnr = 25
ID id; // 120
AnimData *adt; // 8
char type; // 1
char dtx; // 1
short flag; // 2
float passepartalpha; // 4
float clipsta; // 4
float clipend; // 4
float lens; // 4
float ortho_scale; // 4
float drawsize; // 4
float sensor_x; // 4
float sensor_y; // 4
float shiftx; // 4
float shifty; // 4
float YF_dofdist; // 4
Ipo *ipo; // 8
Object *dof_ob; // 8
GPUDOFSettings gpu_dof; // 24
char sensor_fit; // 1
char pad[7]; // 7
CameraStereoSettings stereo; // 24
}; // 248
$ ./target/release/blend_info -n ID blend/factory_v279.blend
ID 120
struct ID { // SDNAnr = 10
void *next; // 8
void *prev; // 8
ID *newid; // 8
Library *lib; // 8
char name[66]; // 66
short flag; // 2
short tag; // 2
short pad_s1; // 2
int us; // 4
int icon_id; // 4
IDProperty *properties; // 8
}; // 120
$ ./target/release/blend_info -n Object.ID.name blend/factory_v279.blend
Object.ID.name = "OBCamera"
Object.ID.name = "OBCube"
Object.ID.name = "OBLamp"
$ ./target/release/blend_info -n Camera.ID.name blend/factory_v279.blend
Camera.ID.name = "CACamera"
$ ./target/release/blend_info -n Lamp.ID.name blend/factory_v279.blend
Lamp.ID.name = "LALamp"
$ ./target/release/blend_info -n Mesh.ID.name blend/factory_v279.blend
Mesh.ID.name = "MECube"
$ ./target/release/blend_info -n Camera.lens blend/factory_v279.blend
Camera.lens = 35_f32
$ ./target/release/blend_info -n Object.obmat blend/factory_v279.blend
Object.obmat = [
0.68592066,
0.72767633,
0.0,
0.0,
-0.32401347,
0.30542085,
0.89539564,
0.0,
0.6515582,
-0.6141704,
0.4452714,
0.0,
7.4811316,
-6.50764,
5.343665,
1.0,
]
Object.obmat = [
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
]
Object.obmat = [
-0.29086465,
0.95517117,
-0.05518906,
0.0,
-0.7711008,
-0.19988336,
0.60452473,
0.0,
0.5663932,
0.2183912,
0.79467225,
0.0,
4.0762453,
1.005454,
5.903862,
1.0,
]