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