-
Notifications
You must be signed in to change notification settings - Fork 6
/
Blender.h
9200 lines (8569 loc) · 145 KB
/
Blender.h
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
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef BLENDER_H
#define BLENDER_H
// Generated using BLENDER-v279
#define BLENDER_VERSION 279
#include <inttypes.h> // int64_t uint64_t
// This has some effect on _MSC_VER only AFAIK
#ifdef near
#undef near
#endif
#ifdef far
#undef far
#endif
#ifdef rad2
#undef rad2
#endif
#ifdef __cplusplus
# ifndef uchar
typedef unsigned char uchar;
# endif
# ifndef ushort
typedef unsigned short ushort;
# endif
namespace Blender {
extern "C" {
#endif // __cplusplus
struct Link {
Link *next;
Link *prev;
};
struct LinkData {
LinkData *next;
LinkData *prev;
void *data;
};
struct ListBase {
void *first;
void *last;
};
struct vec2s {
short x;
short y;
};
struct vec2f {
float x;
float y;
};
struct vec3f {
float x;
float y;
float z;
};
struct rcti {
int xmin;
int xmax;
int ymin;
int ymax;
};
struct rctf {
float xmin;
float xmax;
float ymin;
float ymax;
};
struct IDPropertyData {
void *pointer;
ListBase group;
int val;
int val2;
};
struct IDProperty {
IDProperty *next;
IDProperty *prev;
char type;
char subtype;
short flag;
char name[64];
int saved;
IDPropertyData data;
int len;
int totallen;
};
struct Library;
struct ID {
void *next;
void *prev;
ID *newid;
Library *lib;
char name[66];
short flag;
short tag;
short pad_s1;
int us;
int icon_id;
IDProperty *properties;
};
struct PackedFile;
struct Library {
ID id;
void *filedata;
char name[1024];
char filepath[1024];
Library *parent;
PackedFile *packedfile;
int temp_index;
short versionfile;
short subversionfile;
};
struct PreviewImage {
int w[2];
int h[2];
short flag[2];
short changed_timestamp[2];
int *rect[2];
void *gputexture[2];
int icon_id;
short tag;
char pad[2];
};
struct Object;
struct IpoDriver {
Object *ob;
short blocktype;
short adrcode;
short type;
short flag;
char name[128];
};
struct BPoint;
struct BezTriple;
struct IpoCurve {
IpoCurve *next;
IpoCurve *prev;
BPoint *bp;
BezTriple *bezt;
rctf maxrct;
rctf totrct;
short blocktype;
short adrcode;
short vartype;
short totvert;
short ipo;
short extrap;
short flag;
short rt;
float ymin;
float ymax;
int bitmask;
float slide_min;
float slide_max;
float curval;
IpoDriver *driver;
};
struct Ipo {
ID id;
ListBase curve;
rctf cur;
short blocktype;
short showkey;
short muteipo;
short pad;
};
struct KeyBlock {
KeyBlock *next;
KeyBlock *prev;
float pos;
float curval;
short type;
short pad1;
short relative;
short flag;
int totelem;
int uid;
void *data;
char name[64];
char vgroup[64];
float slidermin;
float slidermax;
};
struct AnimData;
struct Key {
ID id;
AnimData *adt;
KeyBlock *refkey;
char elemstr[32];
int elemsize;
int pad;
ListBase block;
Ipo *ipo;
ID *from;
int totkey;
short flag;
char type;
char pad2;
float ctime;
int uidgen;
};
struct TextLine {
TextLine *next;
TextLine *prev;
char *line;
char *format;
int len;
int blen;
};
struct Text {
ID id;
char *name;
int flags;
int nlines;
ListBase lines;
TextLine *curl;
TextLine *sell;
int curc;
int selc;
char *undo_buf;
int undo_pos;
int undo_len;
void *compiled;
double mtime;
};
struct PackedFile {
int size;
int seek;
void *data;
};
struct GPUDOFSettings {
float focus_distance;
float fstop;
float focal_length;
float sensor;
int num_blades;
int high_quality;
};
struct GPUSSAOSettings {
float factor;
float color[3];
float distance_max;
float attenuation;
int samples;
int pad;
};
struct GPUFXSettings {
GPUDOFSettings *dof;
GPUSSAOSettings *ssao;
char fx_flag;
char pad[7];
};
struct CameraStereoSettings {
float interocular_distance;
float convergence_distance;
short convergence_mode;
short pivot;
short flag;
short pad;
float pole_merge_angle_from;
float pole_merge_angle_to;
};
struct Camera {
ID id;
AnimData *adt;
char type;
char dtx;
short flag;
float passepartalpha;
float clipsta;
float clipend;
float lens;
float ortho_scale;
float drawsize;
float sensor_x;
float sensor_y;
float shiftx;
float shifty;
float YF_dofdist;
Ipo *ipo;
Object *dof_ob;
GPUDOFSettings gpu_dof;
char sensor_fit;
char pad[7];
CameraStereoSettings stereo;
};
struct Scene;
struct ImageUser {
Scene *scene;
int framenr;
int frames;
int offset;
int sfra;
char fie_ima;
char cycl;
char ok;
char multiview_eye;
short pass;
short pad;
short multi_index;
short view;
short layer;
short flag;
};
struct ImageAnim {
ImageAnim *next;
ImageAnim *prev;
void *anim;
};
struct ImageView {
ImageView *next;
ImageView *prev;
char name[64];
char filepath[1024];
};
struct ImagePackedFile {
ImagePackedFile *next;
ImagePackedFile *prev;
PackedFile *packedfile;
char filepath[1024];
};
struct RenderSlot {
char name[64];
};
struct ColorManagedColorspaceSettings {
char name[64];
};
struct Stereo3dFormat;
struct Image {
ID id;
char name[1024];
void *cache;
void *gputexture[2];
ListBase anims;
void *rr;
void *renders[8];
short render_slot;
short last_render_slot;
int flag;
short source;
short type;
int lastframe;
short tpageflag;
short totbind;
short xrep;
short yrep;
short twsta;
short twend;
int bindcode[2];
char pad1[4];
int *repbind;
PackedFile *packedfile;
ListBase packedfiles;
PreviewImage *preview;
float lastupdate;
int lastused;
short animspeed;
short ok;
int gen_x;
int gen_y;
char gen_type;
char gen_flag;
short gen_depth;
float gen_color[4];
float aspx;
float aspy;
ColorManagedColorspaceSettings colorspace_settings;
char alpha_mode;
char pad[5];
char eye;
char views_format;
ListBase views;
Stereo3dFormat *stereo3d_format;
RenderSlot render_slots[8];
};
struct Tex;
struct MTex {
short texco;
short mapto;
short maptoneg;
short blendtype;
Object *object;
Tex *tex;
char uvname[64];
char projx;
char projy;
char projz;
char mapping;
char brush_map_mode;
char brush_angle_mode;
char pad[2];
float ofs[3];
float size[3];
float rot;
float random_angle;
short texflag;
short colormodel;
short pmapto;
short pmaptoneg;
short normapspace;
short which_output;
float r;
float g;
float b;
float k;
float def_var;
float rt;
float colfac;
float varfac;
float norfac;
float dispfac;
float warpfac;
float colspecfac;
float mirrfac;
float alphafac;
float difffac;
float specfac;
float emitfac;
float hardfac;
float raymirrfac;
float translfac;
float ambfac;
float colemitfac;
float colreflfac;
float coltransfac;
float densfac;
float scatterfac;
float reflfac;
float timefac;
float lengthfac;
float clumpfac;
float dampfac;
float kinkfac;
float kinkampfac;
float roughfac;
float padensfac;
float gravityfac;
float lifefac;
float sizefac;
float ivelfac;
float fieldfac;
int pad2;
float shadowfac;
float zenupfac;
float zendownfac;
float blendfac;
};
struct CBData {
float r;
float g;
float b;
float a;
float pos;
int cur;
};
struct ColorBand {
short tot;
short cur;
char ipotype;
char ipotype_hue;
char color_mode;
char pad[1];
CBData data[32];
};
struct EnvMap {
Object *object;
Image *ima;
void *cube[6];
float imat[4][4];
float obimat[3][3];
short type;
short stype;
float clipsta;
float clipend;
float viewscale;
int notlay;
short cuberes;
short depth;
int ok;
int lastframe;
short recalc;
short lastsize;
};
struct CurveMapping;
struct PointDensity {
short flag;
short falloff_type;
float falloff_softness;
float radius;
short source;
short pad0;
short color_source;
short ob_color_source;
int totpoints;
Object *object;
int psys;
short psys_cache_space;
short ob_cache_space;
char vertex_attribute_name[64];
void *point_tree;
float *point_data;
float noise_size;
short noise_depth;
short noise_influence;
short noise_basis;
short pad1[3];
float noise_fac;
float speed_scale;
float falloff_speed_scale;
float pad2;
ColorBand *coba;
CurveMapping *falloff_curve;
};
struct VoxelData {
int resol[3];
int interp_type;
short file_format;
short flag;
short extend;
short smoked_type;
short hair_type;
short data_type;
int _pad;
Object *object;
float int_multiplier;
int still_frame;
char source_path[1024];
float *dataset;
int cachedframe;
int ok;
};
struct OceanTex {
Object *object;
char oceanmod[64];
int output;
int pad;
};
struct bNodeTree;
struct Tex {
ID id;
AnimData *adt;
float noisesize;
float turbul;
float bright;
float contrast;
float saturation;
float rfac;
float gfac;
float bfac;
float filtersize;
float pad2;
float mg_H;
float mg_lacunarity;
float mg_octaves;
float mg_offset;
float mg_gain;
float dist_amount;
float ns_outscale;
float vn_w1;
float vn_w2;
float vn_w3;
float vn_w4;
float vn_mexp;
short vn_distm;
short vn_coltype;
short noisedepth;
short noisetype;
short noisebasis;
short noisebasis2;
short imaflag;
short flag;
short type;
short stype;
float cropxmin;
float cropymin;
float cropxmax;
float cropymax;
int texfilter;
int afmax;
short xrepeat;
short yrepeat;
short extend;
short fie_ima;
int len;
int frames;
int offset;
int sfra;
float checkerdist;
float nabla;
float pad1;
ImageUser iuser;
bNodeTree *nodetree;
Ipo *ipo;
Image *ima;
ColorBand *coba;
EnvMap *env;
PreviewImage *preview;
PointDensity *pd;
VoxelData *vd;
OceanTex *ot;
char use_nodes;
char pad[7];
};
struct TexMapping {
float loc[3];
float rot[3];
float size[3];
int flag;
char projx;
char projy;
char projz;
char mapping;
int type;
float mat[4][4];
float min[3];
float max[3];
Object *ob;
};
struct ColorMapping {
ColorBand coba;
float bright;
float contrast;
float saturation;
int flag;
float blend_color[3];
float blend_factor;
int blend_type;
int pad[3];
};
struct Lamp {
ID id;
AnimData *adt;
short type;
short flag;
int mode;
short colormodel;
short totex;
float r;
float g;
float b;
float k;
float shdwr;
float shdwg;
float shdwb;
float shdwpad;
float energy;
float dist;
float spotsize;
float spotblend;
float haint;
float att1;
float att2;
float coeff_const;
float coeff_lin;
float coeff_quad;
float coeff_pad;
CurveMapping *curfalloff;
short falloff_type;
short pad2;
float clipsta;
float clipend;
float bias;
float soft;
float compressthresh;
float bleedbias;
float pad5;
short bufsize;
short samp;
short buffers;
short filtertype;
char bufflag;
char buftype;
short ray_samp;
short ray_sampy;
short ray_sampz;
short ray_samp_type;
short area_shape;
float area_size;
float area_sizey;
float area_sizez;
float adapt_thresh;
short ray_samp_method;
short shadowmap_type;
short texact;
short shadhalostep;
short sun_effect_type;
short skyblendtype;
float horizon_brightness;
float spread;
float sun_brightness;
float sun_size;
float backscattered_light;
float sun_intensity;
float atm_turbidity;
float atm_inscattering_factor;
float atm_extinction_factor;
float atm_distance_factor;
float skyblendfac;
float sky_exposure;
float shadow_frustum_size;
short sky_colorspace;
char pad4[2];
Ipo *ipo;
MTex *mtex[18];
short pr_texture;
short use_nodes;
char pad6[4];
PreviewImage *preview;
bNodeTree *nodetree;
};
struct VolumeSettings {
float density;
float emission;
float scattering;
float reflection;
float emission_col[3];
float transmission_col[3];
float reflection_col[3];
float density_scale;
float depth_cutoff;
float asymmetry;
short stepsize_type;
short shadeflag;
short shade_type;
short precache_resolution;
float stepsize;
float ms_diff;
float ms_intensity;
float ms_spread;
};
struct GameSettings {
int flag;
int alpha_blend;
int face_orientation;
int pad1;
};
struct TexPaintSlot {
Image *ima;
char *uvname;
int index;
int pad;
};
struct Group;
struct Material {
ID id;
AnimData *adt;
short material_type;
short flag;
float r;
float g;
float b;
float specr;
float specg;
float specb;
float mirr;
float mirg;
float mirb;
float ambr;
float ambb;
float ambg;
float amb;
float emit;
float ang;
float spectra;
float ray_mirror;
float alpha;
float ref;
float spec;
float zoffs;
float add;
float translucency;
VolumeSettings vol;
GameSettings game;
float fresnel_mir;
float fresnel_mir_i;
float fresnel_tra;
float fresnel_tra_i;
float filter;
float tx_limit;
float tx_falloff;
short ray_depth;
short ray_depth_tra;
short har;
char seed1;
char seed2;
float gloss_mir;
float gloss_tra;
short samp_gloss_mir;
short samp_gloss_tra;
float adapt_thresh_mir;
float adapt_thresh_tra;
float aniso_gloss_mir;
float dist_mir;
short fadeto_mir;
short shade_flag;
int mode;
int mode_l;
int mode2;
int mode2_l;
short flarec;
short starc;
short linec;
short ringc;
float hasize;
float flaresize;
float subsize;
float flareboost;
float strand_sta;
float strand_end;
float strand_ease;
float strand_surfnor;
float strand_min;
float strand_widthfade;
char strand_uvname[64];
float sbias;
float lbias;
float shad_alpha;
int septex;
char rgbsel;
char texact;
char pr_type;
char use_nodes;
short pr_lamp;
short pr_texture;
short ml_flag;
char mapflag;
char pad;
short diff_shader;
short spec_shader;
float roughness;
float refrac;
float param[4];
float rms;
float darkness;
short texco;
short mapto;
ColorBand *ramp_col;
ColorBand *ramp_spec;
char rampin_col;
char rampin_spec;
char rampblend_col;
char rampblend_spec;
short ramp_show;
short pad3;
float rampfac_col;
float rampfac_spec;
MTex *mtex[18];
bNodeTree *nodetree;
Ipo *ipo;
Group *group;
PreviewImage *preview;
float friction;
float fh;
float reflect;
float fhdist;
float xyfrict;
short dynamode;
short pad2;
float sss_radius[3];
float sss_col[3];
float sss_error;
float sss_scale;
float sss_ior;
float sss_colfac;
float sss_texfac;
float sss_front;
float sss_back;
short sss_flag;
short sss_preset;
int mapto_textured;
short shadowonly_flag;
short index;
float line_col[4];
short line_priority;
short vcol_alpha;
short paint_active_slot;
short paint_clone_slot;
short tot_slots;
short pad4[3];
char nmap_tangent_names[9][64];
int nmap_tangent_names_count;
int pad5;
TexPaintSlot *texpaintslot;
ListBase gpumaterial;
};
struct VFont {
ID id;
char name[1024];
void *data;
PackedFile *packedfile;
PackedFile *temp_pf;
};
struct BoundBox;
struct MetaElem {
MetaElem *next;
MetaElem *prev;
BoundBox *bb;
short type;
short flag;
short selcol1;
short selcol2;
float x;
float y;
float z;
float quat[4];
float expx;
float expy;
float expz;
float rad;
float rad2;
float s;
float len;
float *mat;
float *imat;
};
struct MetaBall {
ID id;
AnimData *adt;
ListBase elems;
ListBase disp;
ListBase *editelems;
Ipo *ipo;
Material **mat;
char flag;
char flag2;
short totcol;
short texflag;
short pad;
float loc[3];
float size[3];
float rot[3];
float wiresize;
float rendersize;
float thresh;
MetaElem *lastelem;
};
struct BezTriple {
float vec[3][3];
float alfa;
float weight;
float radius;
char ipo;
char h1;
char h2;
char f1;
char f2;
char f3;
char hide;