Blender V4.3
DNA_ipo_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
13
14#pragma once
15
16#include "DNA_curve_types.h"
17#include "DNA_listBase.h"
18#include "DNA_vec_types.h"
19
20#include "DNA_ID.h"
21
22#include "BLI_compiler_attrs.h"
23
24/* -------------------------- Type Defines --------------------------- */
25
26/* --- IPO Curve Driver --- */
27
28/* IPO Curve Driver */
29typedef struct IpoDriver {
31 struct Object *ob;
34
36 short type, flag;
38 char name[128];
40
41/* --- IPO Curve --- */
42
43/* IPO Curve */
44typedef struct IpoCurve {
45 struct IpoCurve *next, *prev;
46
48 struct BPoint *bp;
50 struct BezTriple *bezt;
51
54
56 short blocktype;
58 short adrcode;
60 short vartype;
62 short totvert;
64 short ipo, extrap;
66 short flag;
67 char _pad0[2];
69 float ymin, ymax;
71 unsigned int bitmask;
72
76 float curval;
77
81
82/* --- ID-Datablock --- */
83
84/* IPO Data-Block */
85typedef struct Ipo {
87
92
94 short blocktype;
96 short showkey;
98 short muteipo;
99 char _pad[2];
101
102/* ----------- adrcodes (for matching ipo-curves to data) ------------- */
103
104/* defines: are these duped or new? */
105#define IPOBUTY 17
106
107#define TOB_IPO 1
108#define TOB_IPODROT 2
109
110/* disptype */
111#define IPO_DISPDEGR 1
112#define IPO_DISPBITS 2
113#define IPO_DISPTIME 3
114
115/* ********** Object (ID_OB) ********** */
116
117#define OB_TOTIPO 30
118#define OB_TOTNAM 30
119
120#define OB_LOC_X 1
121#define OB_LOC_Y 2
122#define OB_LOC_Z 3
123#define OB_DLOC_X 4
124#define OB_DLOC_Y 5
125#define OB_DLOC_Z 6
126
127#define OB_ROT_X 7
128#define OB_ROT_Y 8
129#define OB_ROT_Z 9
130#define OB_DROT_X 10
131#define OB_DROT_Y 11
132#define OB_DROT_Z 12
133
134#define OB_SIZE_X 13
135#define OB_SIZE_Y 14
136#define OB_SIZE_Z 15
137#define OB_DSIZE_X 16
138#define OB_DSIZE_Y 17
139#define OB_DSIZE_Z 18
140
141#define OB_LAY 19
142
143#define OB_TIME 20
144
145#define OB_COL_R 21
146#define OB_COL_G 22
147#define OB_COL_B 23
148#define OB_COL_A 24
149
150#define OB_PD_FSTR 25
151#define OB_PD_FFALL 26
152#define OB_PD_SDAMP 27
153#define OB_PD_RDAMP 28
154#define OB_PD_PERM 29
155#define OB_PD_FMAXD 30
156
157/* exception: driver channel, for bone driver only */
158#define OB_ROT_DIFF 100
159
160/* ********** Material (ID_MA) ********** */
161
162#define MA_TOTIPO 40
163#define MA_TOTNAM 26
164
165#define MA_COL_R 1
166#define MA_COL_G 2
167#define MA_COL_B 3
168#define MA_SPEC_R 4
169#define MA_SPEC_G 5
170#define MA_SPEC_B 6
171#define MA_MIR_R 7
172#define MA_MIR_G 8
173#define MA_MIR_B 9
174#define MA_REF 10
175#define MA_ALPHA 11
176#define MA_EMIT 12
177#define MA_AMB 13
178#define MA_SPEC 14
179#define MA_HARD 15
180#define MA_SPTR 16
181#define MA_IOR 17
182#define MA_MODE 18
183#define MA_HASIZE 19
184#define MA_TRANSLU 20
185#define MA_RAYM 21
186#define MA_FRESMIR 22
187#define MA_FRESMIRI 23
188#define MA_FRESTRA 24
189#define MA_FRESTRAI 25
190#define MA_ADD 26
191
192#define MA_MAP1 (1 << 5)
193#define MA_MAP2 (1 << 6)
194#define MA_MAP3 (1 << 7)
195#define MA_MAP4 (1 << 8)
196#define MA_MAP5 (1 << 9)
197#define MA_MAP6 (1 << 10)
198#define MA_MAP7 (1 << 11)
199#define MA_MAP8 (1 << 12)
200#define MA_MAP9 (1 << 13)
201#define MA_MAP10 (1 << 14)
202#define MA_MAP11 (1 << 15)
203#define MA_MAP12 (1 << 16)
204#define MA_MAP13 (1 << 17)
205#define MA_MAP14 (1 << 18)
206#define MA_MAP15 (1 << 19)
207#define MA_MAP16 (1 << 20)
208#define MA_MAP17 (1 << 21)
209#define MA_MAP18 (1 << 22)
210
211/* ********** Texture Slots (MTex) ********** */
212
213#define TEX_TOTNAM 14
214
215#define MAP_OFS_X 1
216#define MAP_OFS_Y 2
217#define MAP_OFS_Z 3
218#define MAP_SIZE_X 4
219#define MAP_SIZE_Y 5
220#define MAP_SIZE_Z 6
221#define MAP_R 7
222#define MAP_G 8
223#define MAP_B 9
224
225#define MAP_DVAR 10
226#define MAP_COLF 11
227#define MAP_NORF 12
228#define MAP_VARF 13
229#define MAP_DISP 14
230
231/* ********** Texture (ID_TE) ********** */
232
233#define TE_TOTIPO 26
234#define TE_TOTNAM 26
235
236#define TE_NSIZE 1
237#define TE_NDEPTH 2
238#define TE_NTYPE 3
239#define TE_TURB 4
240
241#define TE_VNW1 5
242#define TE_VNW2 6
243#define TE_VNW3 7
244#define TE_VNW4 8
245#define TE_VNMEXP 9
246#define TE_VN_DISTM 10
247#define TE_VN_COLT 11
248
249#define TE_ISCA 12
250#define TE_DISTA 13
251
252#define TE_MG_TYP 14
253#define TE_MGH 15
254#define TE_MG_LAC 16
255#define TE_MG_OCT 17
256#define TE_MG_OFF 18
257#define TE_MG_GAIN 19
258
259#define TE_N_BAS1 20
260#define TE_N_BAS2 21
261
262#define TE_COL_R 22
263#define TE_COL_G 23
264#define TE_COL_B 24
265#define TE_BRIGHT 25
266#define TE_CONTRA 26
267
268/* ******** Sequence (ID_SEQ) ********** */
269
270#define SEQ_TOTIPO 1
271#define SEQ_TOTNAM 1
272
273#define SEQ_FAC1 1
274#define SEQ_FAC_SPEED 2
275#define SEQ_FAC_OPACITY 3
276
277/* ********* Curve (ID_CU_LEGACY) *********** */
278
279#define CU_TOTIPO 1
280#define CU_TOTNAM 1
281
282#define CU_SPEED 1
283
284/* ********* ShapeKey (ID_KE) *********** */
285
286#define KEY_TOTIPO 64
287#define KEY_TOTNAM 64
288
289#define KEY_SPEED 0
290#define KEY_NR 1
291
292/* ********* World (ID_WO) *********** */
293
294#define WO_TOTIPO 29
295#define WO_TOTNAM 16
296
297#define WO_HOR_R 1
298#define WO_HOR_G 2
299#define WO_HOR_B 3
300#define WO_ZEN_R 4
301#define WO_ZEN_G 5
302#define WO_ZEN_B 6
303
304#define WO_EXPOS 7
305
306#define WO_MISI 8
307#define WO_MISTDI 9
308#define WO_MISTSTA 10
309#define WO_MISTHI 11
310
311/* Stars are deprecated & unused. */
312// #define WO_STAR_R 12
313// #define WO_STAR_G 13
314// #define WO_STAR_B 14
315// #define WO_STARDIST 15
316// #define WO_STARSIZE 16
317
318/* ********** Light (ID_LA) ********** */
319
320#define LA_TOTIPO 21
321#define LA_TOTNAM 10
322
323#define LA_ENERGY 1
324#define LA_COL_R 2
325#define LA_COL_G 3
326#define LA_COL_B 4
327#define LA_DIST 5
328#define LA_SPOTSI 6
329#define LA_SPOTBL 7
330#define LA_QUAD1 8
331#define LA_QUAD2 9
332#define LA_HALOINT 10
333
334/* ********* Camera (ID_CA) ************ */
335
336#define CAM_TOTIPO 7
337#define CAM_TOTNAM 7
338
339#define CAM_LENS 1
340#define CAM_STA 2
341#define CAM_END 3
342
343/* YAFRAY aperture & focal distance curves. */
344#define CAM_YF_APERT 4
345#define CAM_YF_FDIST 5
346
347#define CAM_SHIFT_X 6
348#define CAM_SHIFT_Y 7
349
350/* ********* Sound (ID_SO) *********** */
351
352#define SND_TOTIPO 4
353#define SND_TOTNAM 4
354
355#define SND_VOLUME 1
356#define SND_PITCH 2
357#define SND_PANNING 3
358#define SND_ATTEN 4
359
360/* ******* PoseChannel (ID_PO) ********* */
361
362#define AC_TOTIPO 13
363#define AC_TOTNAM 13
364
365#define AC_LOC_X 1
366#define AC_LOC_Y 2
367#define AC_LOC_Z 3
368
369#define AC_SIZE_X 13
370#define AC_SIZE_Y 14
371#define AC_SIZE_Z 15
372
373#define AC_EUL_X 16
374#define AC_EUL_Y 17
375#define AC_EUL_Z 18
376
377#define AC_QUAT_W 25
378#define AC_QUAT_X 26
379#define AC_QUAT_Y 27
380#define AC_QUAT_Z 28
381
382/* ******** Constraint (ID_CO) ********** */
383
384#define CO_TOTIPO 2
385#define CO_TOTNAM 2
386
387#define CO_ENFORCE 1
388#define CO_HEADTAIL 2
389
390/* ****** FluidSim (ID_FLUIDSIM) ****** */
391
392#define FLUIDSIM_TOTIPO 13
393#define FLUIDSIM_TOTNAM 13
394
395#define FLUIDSIM_VISC 1
396#define FLUIDSIM_TIME 2
397
398#define FLUIDSIM_GRAV_X 3
399#define FLUIDSIM_GRAV_Y 4
400#define FLUIDSIM_GRAV_Z 5
401
402#define FLUIDSIM_VEL_X 6
403#define FLUIDSIM_VEL_Y 7
404#define FLUIDSIM_VEL_Z 8
405
406#define FLUIDSIM_ACTIVE 9
407
408#define FLUIDSIM_ATTR_FORCE_STR 10
409#define FLUIDSIM_ATTR_FORCE_RADIUS 11
410#define FLUIDSIM_VEL_FORCE_STR 12
411#define FLUIDSIM_VEL_FORCE_RADIUS 13
412
413/* ******************** */
414/* particle ipos */
415
416/* ******* Particle (ID_PA) ******** */
417#define PART_TOTIPO 25
418#define PART_TOTNAM 25
419
420#define PART_EMIT_FREQ 1
421// #define PART_EMIT_LIFE 2 /* UNUSED */
422#define PART_EMIT_VEL 3
423#define PART_EMIT_AVE 4
424// #define PART_EMIT_SIZE 5 /* UNUSED */
425
426#define PART_AVE 6
427#define PART_SIZE 7
428#define PART_DRAG 8
429#define PART_BROWN 9
430#define PART_DAMP 10
431#define PART_LENGTH 11
432#define PART_CLUMP 12
433
434#define PART_GRAV_X 13
435#define PART_GRAV_Y 14
436#define PART_GRAV_Z 15
437
438#define PART_KINK_AMP 16
439#define PART_KINK_FREQ 17
440#define PART_KINK_SHAPE 18
441
442#define PART_BB_TILT 19
443
444#define PART_PD_FSTR 20
445#define PART_PD_FFALL 21
446#define PART_PD_FMAXD 22
447
448#define PART_PD2_FSTR 23
449#define PART_PD2_FFALL 24
450#define PART_PD2_FMAXD 25
451
452/* -------------------- Defines: Flags and Types ------------------ */
453
454/* ----- IPO Curve Defines ------- */
455
456/* icu->vartype */
457#define IPO_CHAR 0
458#define IPO_SHORT 1
459#define IPO_INT 2
460#define IPO_LONG 3
461#define IPO_FLOAT 4
462#define IPO_DOUBLE 5
463#define IPO_FLOAT_DEGR 6
464
465/* very special case, in keys */
466#define IPO_BEZTRIPLE 100
467#define IPO_BPOINT 101
468
469/* icu->vartype */
470#define IPO_BITS 16
471#define IPO_CHAR_BIT 16
472#define IPO_SHORT_BIT 17
473#define IPO_INT_BIT 18
474
475/* icu->ipo: the type of curve. */
476#define IPO_CONST 0
477#define IPO_LIN 1
478#define IPO_BEZ 2
479/* not used yet */
480#define IPO_MIXED 3
481
482/* icu->extrap */
483#define IPO_HORIZ 0
484#define IPO_DIR 1
485#define IPO_CYCL 2
486#define IPO_CYCLX 3
487
488/* icu->flag */
489#define IPO_VISIBLE 1
490#define IPO_SELECT 2
491#define IPO_EDIT 4
492#define IPO_LOCK 8
493#define IPO_AUTO_HORIZ 16
494#define IPO_ACTIVE 32
495#define IPO_PROTECT 64
496#define IPO_MUTE 128
497
498/* ---------- IPO Drivers ----------- */
499
500/* Offset in driver->name for finding second posechannel for rot-diff. */
501#define DRIVER_NAME_OFFS 32
502
503/* driver->type */
504#define IPO_DRIVER_TYPE_NORMAL 0
505#define IPO_DRIVER_TYPE_PYTHON 1
506
507/* driver->flag */
508/* invalid flag: currently only used for buggy pydriver expressions */
509#define IPO_DRIVER_FLAG_INVALID (1 << 0)
ID and Library types, which are fundamental for SDNA.
These structs are the foundation for all linked lists in the library system.
Definition DNA_ID.h:413
struct IpoCurve * prev
struct BezTriple * bezt
unsigned int bitmask
IpoDriver * driver
char _pad0[2]
float slide_min
short totvert
short blocktype
struct BPoint * bp
short extrap
short vartype
short adrcode
float slide_max
float curval
struct IpoCurve * next
char name[128]
short blocktype
struct Object * ob
short adrcode
short muteipo
ListBase curve
short showkey
rctf cur
short blocktype
char _pad[2]