1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
/// Error returned when an empty `.blend` byte slice is passed to `parse_blend_bytes`.
pub const ERR_BLEND_SCENE_EMPTY: &str = "blend: empty input buffer";
/// Default scene name assigned when a `.blend` archive does not expose a named `SC` block.
pub const DEFAULT_BLEND_SCENE_NAME: &str = "Scene";
/// Default Blender frames-per-second rate when `Scene.r.frs` is absent or zero.
pub const BLEND_DEFAULT_FPS: f32 = 24.0;
/// Default Blender camera focal length in millimeters.
pub const BLEND_DEFAULT_CAMERA_LENS_MM: f32 = 50.0;
/// Default Blender camera horizontal sensor width in millimeters.
pub const BLEND_DEFAULT_SENSOR_X_MM: f32 = 36.0;
/// Default Blender camera vertical sensor height in millimeters.
pub const BLEND_DEFAULT_SENSOR_Y_MM: f32 = 24.0;
/// Default Blender orthographic camera scale.
pub const BLEND_DEFAULT_ORTHO_SCALE: f32 = 6.0;
/// Default Blender camera near clip plane distance.
pub const BLEND_DEFAULT_CLIP_START: f32 = 0.1;
/// Default Blender camera far clip plane distance.
pub const BLEND_DEFAULT_CLIP_END: f32 = 1000.0;
/// Blender `Object.type` constant for Light/Lamp objects (`OB_LAMP`).
pub const BLEND_OB_TYPE_LAMP: i32 = 10;
/// Blender `Object.type` constant for Camera objects (`OB_CAMERA`).
pub const BLEND_OB_TYPE_CAMERA: i32 = 11;
/// Blender `Light.type` constant for Point lights (`LA_LOCAL`).
pub const BLEND_LIGHT_POINT: i32 = 0;
/// Blender `Light.type` constant for Directional Sun lights (`LA_SUN`).
pub const BLEND_LIGHT_SUN: i32 = 1;
/// Blender `Light.type` constant for Spot lights (`LA_SPOT`).
pub const BLEND_LIGHT_SPOT: i32 = 2;
/// Blender `Light.type` constant for Area lights (`LA_AREA`).
pub const BLEND_LIGHT_AREA: i32 = 4;
/// Blender `CustomData` type constant for legacy `MVert` (`CD_MVERT`).
pub const BLEND_CD_MVERT: i32 = 0;
/// Blender `CustomData` type constant for vertex deform weights (`CD_MDEFORMVERT`).
pub const BLEND_CD_MDEFORMVERT: i32 = 2;
/// Blender `CustomData` type constant for 32-bit integer attributes (`CD_PROP_INT32`).
pub const BLEND_CD_PROP_INT32: i32 = 10;
/// Blender `CustomData` type constant for legacy `MLoopUV` (`CD_MLOOPUV`).
pub const BLEND_CD_MLOOPUV: i32 = 16;
/// Blender `CustomData` type constant for legacy `MLoopCol` (`CD_MLOOPCOL`).
pub const BLEND_CD_MLOOPCOL: i32 = 17;
/// Blender `CustomData` type constant for legacy `MPoly` (`CD_MPOLY`).
pub const BLEND_CD_MPOLY: i32 = 25;
/// Blender `CustomData` type constant for legacy `MLoop` (`CD_MLOOP`).
pub const BLEND_CD_MLOOP: i32 = 26;
/// Blender `CustomData` type constant for float RGBA color attributes (`CD_PROP_COLOR`).
pub const BLEND_CD_PROP_COLOR: i32 = 47;
/// Blender `CustomData` type constant for 3D float vector attributes (`CD_PROP_FLOAT3`).
pub const BLEND_CD_PROP_FLOAT3: i32 = 48;
/// Blender `CustomData` type constant for 2D float vector attributes (`CD_PROP_FLOAT2`).
pub const BLEND_CD_PROP_FLOAT2: i32 = 49;
/// Blender `CustomData` type constant for byte RGBA color attributes (`CD_PROP_BYTE_COLOR`).
pub const BLEND_CD_PROP_BYTE_COLOR: i32 = 50;
/// Blender `bNode.type` constant for Principled BSDF (`SH_NODE_BSDF_PRINCIPLED`).
pub const BLEND_NODE_TYPE_PRINCIPLED: i32 = 193;
/// Blender `bNode.type` constant for Image Texture (`SH_NODE_TEX_IMAGE`).
pub const BLEND_NODE_TYPE_TEX_IMAGE: i32 = 143;
/// Blender `bNode.type` constant for Normal Map (`SH_NODE_NORMAL_MAP`).
pub const BLEND_NODE_TYPE_NORMAL_MAP: i32 = 192;
/// Blender `ShaderNodeBsdfPrincipled` `idname` string.
pub const BLEND_NODE_ID_PRINCIPLED: &str = "ShaderNodeBsdfPrincipled";
/// Blender `ShaderNodeTexImage` `idname` string.
pub const BLEND_NODE_ID_TEX_IMAGE: &str = "ShaderNodeTexImage";
/// Blender `ShaderNodeNormalMap` `idname` string.
pub const BLEND_NODE_ID_NORMAL_MAP: &str = "ShaderNodeNormalMap";
/// Blender `CustomDataLayer.name` for Blender 4.x/5.x vertex positions.
pub const BLEND_LAYER_POSITION: &str = "position";
/// Blender `CustomDataLayer.name` for Blender 4.x/5.x polygon corner vertex indices.
pub const BLEND_LAYER_CORNER_VERT: &str = ".corner_vert";
/// Blender `CustomDataLayer.name` for per-face material indices.
pub const BLEND_LAYER_MATERIAL_INDEX: &str = "material_index";
/// Principled BSDF input socket label for base color.
pub const SOCK_BASE_COLOR: &str = "Base Color";
/// Principled BSDF input socket label for metallic factor.
pub const SOCK_METALLIC: &str = "Metallic";
/// Principled BSDF input socket label for roughness factor.
pub const SOCK_ROUGHNESS: &str = "Roughness";
/// Principled BSDF input socket label for alpha opacity.
pub const SOCK_ALPHA: &str = "Alpha";
/// Principled BSDF 3.x input socket label for emission color.
pub const SOCK_EMISSION_3X: &str = "Emission";
/// Principled BSDF 4.x/5.x input socket label for emission color.
pub const SOCK_EMISSION_COLOR: &str = "Emission Color";
/// Principled BSDF input socket label for emission strength.
pub const SOCK_EMISSION_STRENGTH: &str = "Emission Strength";
/// Principled BSDF 3.x input socket label for clearcoat weight.
pub const SOCK_CLEARCOAT_3X: &str = "Clearcoat";
/// Principled BSDF 4.x/5.x input socket label for coat weight.
pub const SOCK_COAT_WEIGHT: &str = "Coat Weight";
/// Principled BSDF 3.x input socket label for clearcoat roughness.
pub const SOCK_CLEARCOAT_ROUGH_3X: &str = "Clearcoat Roughness";
/// Principled BSDF 4.x/5.x input socket label for coat roughness.
pub const SOCK_COAT_ROUGHNESS: &str = "Coat Roughness";
/// Principled BSDF 3.x input socket label for sheen weight.
pub const SOCK_SHEEN_3X: &str = "Sheen";
/// Principled BSDF 4.x/5.x input socket label for sheen weight.
pub const SOCK_SHEEN_WEIGHT: &str = "Sheen Weight";
/// Principled BSDF input socket label for sheen tint color.
pub const SOCK_SHEEN_TINT: &str = "Sheen Tint";
/// Principled BSDF input socket label for sheen roughness.
pub const SOCK_SHEEN_ROUGHNESS: &str = "Sheen Roughness";
/// Principled BSDF 3.x input socket label for specular factor.
pub const SOCK_SPECULAR_3X: &str = "Specular";
/// Principled BSDF 4.x/5.x input socket label for specular IOR level.
pub const SOCK_SPECULAR_IOR_LEVEL: &str = "Specular IOR Level";
/// Principled BSDF 3.x input socket label for optical transmission.
pub const SOCK_TRANSMISSION_3X: &str = "Transmission";
/// Principled BSDF 4.x/5.x input socket label for optical transmission weight.
pub const SOCK_TRANSMISSION_WEIGHT: &str = "Transmission Weight";
/// Principled BSDF input socket label for tangent-space normal input.
pub const SOCK_NORMAL: &str = "Normal";
/// Normal Map node input socket label for normal strength.
pub const SOCK_STRENGTH: &str = "Strength";
/// Normal Map node input socket label for color texture input.
pub const SOCK_COLOR: &str = "Color";
/// SDNA struct name `MVert`.
pub const TYPE_MVERT: &str = "MVert";
/// SDNA struct name `MPoly`.
pub const TYPE_MPOLY: &str = "MPoly";
/// SDNA struct name `MLoop`.
pub const TYPE_MLOOP: &str = "MLoop";
/// SDNA struct name `MLoopUV`.
pub const TYPE_MLOOPUV: &str = "MLoopUV";
/// SDNA struct name `MDeformVert`.
pub const TYPE_MDEFORMVERT: &str = "MDeformVert";
/// SDNA struct name `MDeformWeight`.
pub const TYPE_MDEFORMWEIGHT: &str = "MDeformWeight";
/// SDNA struct name `CustomDataLayer`.
pub const TYPE_CUSTOM_DATA_LAYER: &str = "CustomDataLayer";
/// SDNA struct name `KeyBlock`.
pub const TYPE_KEYBLOCK: &str = "KeyBlock";
/// SDNA struct name `PackedFile`.
pub const TYPE_PACKED_FILE: &str = "PackedFile";
/// SDNA struct name `ImagePackedFile`.
pub const TYPE_IMAGE_PACKED_FILE: &str = "ImagePackedFile";
/// SDNA struct name `bNodeTree`.
pub const TYPE_BNODE_TREE: &str = "bNodeTree";
/// SDNA struct name `bNode`.
pub const TYPE_BNODE: &str = "bNode";
/// SDNA struct name `bNodeSocket`.
pub const TYPE_BNODE_SOCKET: &str = "bNodeSocket";
/// SDNA struct name `bNodeLink`.
pub const TYPE_BNODE_LINK: &str = "bNodeLink";
/// SDNA struct name `bNodeSocketValueRGBA`.
pub const TYPE_SOCK_VAL_RGBA: &str = "bNodeSocketValueRGBA";
/// SDNA struct name `bNodeSocketValueFloat`.
pub const TYPE_SOCK_VAL_FLOAT: &str = "bNodeSocketValueFloat";
/// SDNA struct name `Bone`.
pub const TYPE_BONE: &str = "Bone";
/// SDNA struct name `bDeformGroup`.
pub const TYPE_DEFORM_GROUP: &str = "bDeformGroup";
/// SDNA struct name `CollectionChild`.
pub const TYPE_COLLECTION_CHILD: &str = "CollectionChild";
/// SDNA struct name `CollectionObject`.
pub const TYPE_COLLECTION_OBJECT: &str = "CollectionObject";
/// SDNA struct name `Collection`.
pub const TYPE_COLLECTION: &str = "Collection";
/// SDNA struct name `FCurve`.
pub const TYPE_FCURVE: &str = "FCurve";
/// SDNA struct name `BezTriple`.
pub const TYPE_BEZ_TRIPLE: &str = "BezTriple";
/// SDNA struct name `AnimData`.
pub const TYPE_ANIM_DATA: &str = "AnimData";
/// SDNA struct name `ActionLayer`.
pub const TYPE_ACTION_LAYER: &str = "ActionLayer";
/// SDNA struct name `ActionStrip`.
pub const TYPE_ACTION_STRIP: &str = "ActionStrip";
/// SDNA struct name `ActionChannelbag`.
pub const TYPE_ACTION_CHANNELBAG: &str = "ActionChannelbag";
/// SDNA field name `packedfile`.
pub const FLD_PACKEDFILE: &str = "packedfile";
/// SDNA field name `packedfiles`.
pub const FLD_PACKEDFILES: &str = "packedfiles";
/// SDNA field name `size`.
pub const FLD_SIZE: &str = "size";
/// SDNA field name `data`.
pub const FLD_DATA: &str = "data";
/// SDNA field name `nodetree`.
pub const FLD_NODETREE: &str = "nodetree";
/// SDNA field name `nodes`.
pub const FLD_NODES: &str = "nodes";
/// SDNA field name `links`.
pub const FLD_LINKS: &str = "links";
/// SDNA field name `idname`.
pub const FLD_IDNAME: &str = "idname";
/// SDNA field name `type`.
pub const FLD_TYPE: &str = "type";
/// SDNA field name `inputs`.
pub const FLD_INPUTS: &str = "inputs";
/// SDNA field name `default_value`.
pub const FLD_DEFAULT_VALUE: &str = "default_value";
/// SDNA field name `value`.
pub const FLD_VALUE: &str = "value";
/// SDNA field name `tosock`.
pub const FLD_TOSOCK: &str = "tosock";
/// SDNA field name `fromnode`.
pub const FLD_FROMNODE: &str = "fromnode";
/// SDNA field name `metallic`.
pub const FLD_METALLIC: &str = "metallic";
/// SDNA field name `roughness`.
pub const FLD_ROUGHNESS: &str = "roughness";
/// SDNA field name `totvert`.
pub const FLD_TOTVERT: &str = "totvert";
/// SDNA field name `verts_num`.
pub const FLD_VERTS_NUM: &str = "verts_num";
/// SDNA field name `totpoly`.
pub const FLD_TOTPOLY: &str = "totpoly";
/// SDNA field name `faces_num`.
pub const FLD_FACES_NUM: &str = "faces_num";
/// SDNA field name `totloop`.
pub const FLD_TOTLOOP: &str = "totloop";
/// SDNA field name `corners_num`.
pub const FLD_CORNERS_NUM: &str = "corners_num";
/// SDNA field name `mvert`.
pub const FLD_MVERT: &str = "mvert";
/// SDNA field name `mpoly`.
pub const FLD_MPOLY: &str = "mpoly";
/// SDNA field name `mloop`.
pub const FLD_MLOOP: &str = "mloop";
/// SDNA field name `mloopuv`.
pub const FLD_MLOOPUV: &str = "mloopuv";
/// SDNA field name `mloopcol`.
pub const FLD_MLOOPCOL: &str = "mloopcol";
/// SDNA field name `dvert`.
pub const FLD_DVERT: &str = "dvert";
/// SDNA field name `vdata`.
pub const FLD_VDATA: &str = "vdata";
/// SDNA field name `ldata`.
pub const FLD_LDATA: &str = "ldata";
/// SDNA field name `pdata`.
pub const FLD_PDATA: &str = "pdata";
/// SDNA field name `layers`.
pub const FLD_LAYERS: &str = "layers";
/// SDNA field name `totlayer`.
pub const FLD_TOTLAYER: &str = "totlayer";
/// SDNA field name `face_offset_indices`.
pub const FLD_FACE_OFFSETS: &str = "face_offset_indices";
/// SDNA field name `loopstart`.
pub const FLD_LOOPSTART: &str = "loopstart";
/// SDNA field name `mat_nr`.
pub const FLD_MAT_NR: &str = "mat_nr";
/// SDNA field name `totcol`.
pub const FLD_TOTCOL: &str = "totcol";
/// SDNA field name `totweight`.
pub const FLD_TOTWEIGHT: &str = "totweight";
/// SDNA field name `def_nr`.
pub const FLD_DEF_NR: &str = "def_nr";
/// SDNA field name `weight`.
pub const FLD_WEIGHT: &str = "weight";
/// SDNA field name `block`.
pub const FLD_BLOCK: &str = "block";
/// SDNA field name `totelem`.
pub const FLD_TOTELEM: &str = "totelem";
/// SDNA field name `curval`.
pub const FLD_CURVAL: &str = "curval";
/// SDNA field name `bonebase`.
pub const FLD_BONEBASE: &str = "bonebase";
/// SDNA field name `childbase`.
pub const FLD_CHILDBASE: &str = "childbase";
/// SDNA field name `arm_mat`.
pub const FLD_ARM_MAT: &str = "arm_mat";
/// SDNA field name `arm_head`.
pub const FLD_ARM_HEAD: &str = "arm_head";
/// SDNA field name `obmat`.
pub const FLD_OBMAT: &str = "obmat";
/// SDNA field name `parent`.
pub const FLD_PARENT: &str = "parent";
/// SDNA field name `quat`.
pub const FLD_QUAT: &str = "quat";
/// SDNA field name `scale`.
pub const FLD_SCALE: &str = "scale";
/// SDNA field name `defbase`.
pub const FLD_DEFBASE: &str = "defbase";
/// SDNA field name `vertex_group_names`.
pub const FLD_VGROUP_NAMES: &str = "vertex_group_names";
/// SDNA field name `restrictflag`.
pub const FLD_RESTRICTFLAG: &str = "restrictflag";
/// SDNA field name `visibility_flag`.
pub const FLD_VISIBILITY_FLAG: &str = "visibility_flag";
/// SDNA field name `master_collection`.
pub const FLD_MASTER_COLLECTION: &str = "master_collection";
/// SDNA field name `children`.
pub const FLD_CHILDREN: &str = "children";
/// SDNA field name `gobject`.
pub const FLD_GOBJECT: &str = "gobject";
/// SDNA field name `collection`.
pub const FLD_COLLECTION: &str = "collection";
/// SDNA field name `lens`.
pub const FLD_LENS: &str = "lens";
/// SDNA field name `sensor_x`.
pub const FLD_SENSOR_X: &str = "sensor_x";
/// SDNA field name `sensor_y`.
pub const FLD_SENSOR_Y: &str = "sensor_y";
/// SDNA field name `ortho_scale`.
pub const FLD_ORTHO_SCALE: &str = "ortho_scale";
/// SDNA field name `clip_start`.
pub const FLD_CLIP_START: &str = "clip_start";
/// SDNA field name `clipsta`.
pub const FLD_CLIPSTA: &str = "clipsta";
/// SDNA field name `clip_end`.
pub const FLD_CLIP_END: &str = "clip_end";
/// SDNA field name `clipend`.
pub const FLD_CLIPEND: &str = "clipend";
/// SDNA field name `energy`.
pub const FLD_ENERGY: &str = "energy";
/// SDNA field name `spotsize`.
pub const FLD_SPOTSIZE: &str = "spotsize";
/// SDNA field name `spotblend`.
pub const FLD_SPOTBLEND: &str = "spotblend";
/// SDNA field name `area_size`.
pub const FLD_AREA_SIZE: &str = "area_size";
/// SDNA field name `area_sizey`.
pub const FLD_AREA_SIZEY: &str = "area_sizey";
/// SDNA field name `dist`.
pub const FLD_DIST: &str = "dist";
/// SDNA field name `cutoff_distance`.
pub const FLD_CUTOFF_DISTANCE: &str = "cutoff_distance";
/// SDNA field name `curves`.
pub const FLD_CURVES: &str = "curves";
/// SDNA field name `rna_path`.
pub const FLD_RNA_PATH: &str = "rna_path";
/// SDNA field name `array_index`.
pub const FLD_ARRAY_INDEX: &str = "array_index";
/// SDNA field name `bezt`.
pub const FLD_BEZT: &str = "bezt";
/// SDNA field name `action`.
pub const FLD_ACTION: &str = "action";
/// SDNA field name `layer_array_num`.
pub const FLD_LAYER_ARRAY_NUM: &str = "layer_array_num";
/// SDNA field name `strip_array_num`.
pub const FLD_STRIP_ARRAY_NUM: &str = "strip_array_num";
/// SDNA field name `strips`.
pub const FLD_STRIPS: &str = "strips";
/// SDNA field name `channelbag_array_num`.
pub const FLD_CHANNELBAG_ARRAY_NUM: &str = "channelbag_array_num";
/// SDNA field name `channelbags`.
pub const FLD_CHANNELBAGS: &str = "channelbags";
/// SDNA field name `fcurve_array_num`.
pub const FLD_FCURVE_ARRAY_NUM: &str = "fcurve_array_num";
/// SDNA field name `fcurves`.
pub const FLD_FCURVES: &str = "fcurves";
/// SDNA field name `frs_sec`.
pub const FLD_FRS_SEC: &str = "frs_sec";
/// RNA path for object translation keyframes.
pub const RNA_LOCATION: &str = "location";
/// RNA path for object Euler rotation keyframes.
pub const RNA_ROTATION_EULER: &str = "rotation_euler";
/// RNA path for object quaternion rotation keyframes.
pub const RNA_ROTATION_QUAT: &str = "rotation_quaternion";
/// RNA path for object scale keyframes.
pub const RNA_SCALE: &str = "scale";
/// RNA path prefix for pose bone keyframes.
pub const RNA_POSE_BONES_PREFIX: &str = "pose.bones[\"";
/// RNA path prefix for shape key keyframes.
pub const RNA_KEY_BLOCKS_PREFIX: &str = "key_blocks[\"";
/// RNA path suffix closing a quoted identifier before the property name.
pub const RNA_BRACKET_DOT: &str = "\"].";
/// Error returned when packed TGA image bytes are truncated or unsupported.
pub const ERR_BLEND_TGA_INVALID: &str = "blend: unsupported or truncated TGA packed image";