2 * blenlib/DNA_ipo_types.h (mar-2001 nzc)
6 * ***** BEGIN GPL LICENSE BLOCK *****
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 * All rights reserved.
25 * The Original Code is: all of this file.
27 * Contributor(s): Joshua Leung
29 * ***** END GPL LICENSE BLOCK *****
31 #ifndef DNA_IPO_TYPES_H
32 #define DNA_IPO_TYPES_H
34 #include "DNA_listBase.h"
35 #include "DNA_curve_types.h"
36 #include "DNA_vec_types.h"
40 /* -------------------------- Type Defines --------------------------- */
42 /* sometimes used - mainly for GE/Ketsji */
43 typedef short IPO_Channel;
46 /* --- IPO Curve Driver --- */
48 /* IPO Curve Driver */
49 typedef struct IpoDriver {
50 struct Object *ob; /* target/driver ob */
51 short blocktype, adrcode; /* sub-channel to use */
53 short type, flag; /* driver settings */
54 char name[128]; /* bone, or python expression here */
57 /* --- IPO Curve --- */
60 typedef struct IpoCurve {
61 struct IpoCurve *next, *prev;
63 struct BPoint *bp; /* array of BPoints (sizeof(BPoint)*totvert) - i.e. baked/imported data */
64 struct BezTriple *bezt; /* array of BezTriples (sizeof(BezTriple)*totvert) - i.e. user-editable keyframes */
66 rctf maxrct, totrct; /* bounding boxes */
68 short blocktype, adrcode, vartype; /* blocktype= ipo-blocktype; adrcode= type of ipo-curve; vartype= 'format' of data */
69 short totvert; /* total number of BezTriples (i.e. keyframes) on curve */
70 short ipo, extrap; /* interpolation and extrapolation modes */
71 short flag, rt; /* flag= settings; rt= ??? */
72 float ymin, ymax; /* minimum/maximum y-extents for curve */
73 unsigned int bitmask; /* ??? */
75 float slide_min, slide_max; /* minimum/maximum values for sliders (in action editor) */
76 float curval; /* value of ipo-curve for current frame */
78 IpoDriver *driver; /* pointer to ipo-driver for this curve */
81 /* --- ID-Datablock --- */
87 ListBase curve; /* A list of IpoCurve structs in a linked list. */
88 rctf cur; /* Rect defining extents of keyframes? */
90 short blocktype, showkey; /* blocktype: self-explanatory; showkey: either 0 or 1 (show vertical yellow lines for editing) */
91 short muteipo, pad; /* muteipo: either 0 or 1 (whether ipo block is muted) */
94 /* ----------- adrcodes (for matching ipo-curves to data) ------------- */
96 /* defines: are these duped or new? */
100 #define TOB_IPODROT 2
103 #define IPO_DISPDEGR 1
104 #define IPO_DISPBITS 2
105 #define IPO_DISPTIME 3
107 /* ********** Object (ID_OB) ********** */
129 #define OB_DSIZE_X 16
130 #define OB_DSIZE_Y 17
131 #define OB_DSIZE_Z 18
142 #define OB_PD_FSTR 25
143 #define OB_PD_FFALL 26
144 #define OB_PD_SDAMP 27
145 #define OB_PD_RDAMP 28
146 #define OB_PD_PERM 29
147 #define OB_PD_FMAXD 30
149 /* exception: driver channel, for bone driver only */
150 #define OB_ROT_DIFF 100
153 /* ********** Material (ID_MA) ********** */
177 #define MA_TRANSLU 20
179 #define MA_FRESMIR 22
180 #define MA_FRESMIRI 23
181 #define MA_FRESTRA 24
182 #define MA_FRESTRAI 25
185 #define MA_MAP1 (1<<5)
186 #define MA_MAP2 (1<<6)
187 #define MA_MAP3 (1<<7)
188 #define MA_MAP4 (1<<8)
189 #define MA_MAP5 (1<<9)
190 #define MA_MAP6 (1<<10)
191 #define MA_MAP7 (1<<11)
192 #define MA_MAP8 (1<<12)
193 #define MA_MAP9 (1<<13)
194 #define MA_MAP10 (1<<14)
195 #define MA_MAP11 (1<<15)
196 #define MA_MAP12 (1<<16)
197 #define MA_MAP13 (1<<17)
198 #define MA_MAP14 (1<<18)
199 #define MA_MAP15 (1<<19)
200 #define MA_MAP16 (1<<20)
201 #define MA_MAP17 (1<<21)
202 #define MA_MAP18 (1<<22)
204 #define TEX_TOTNAM 14
222 /* ********** Texture (ID_TE) ********** */
237 #define TE_VN_DISTM 10
238 #define TE_VN_COLT 11
248 #define TE_MG_GAIN 19
259 /* ******** Sequence (ID_SEQ) ********** */
266 /* ********* Curve (ID_CU) *********** */
273 /* ********* ShapeKey (ID_KE) *********** */
275 #define KEY_TOTIPO 64
276 #define KEY_TOTNAM 64
281 /* ********* World (ID_WO) *********** */
297 #define WO_MISTSTA 10
303 #define WO_STARDIST 15
304 #define WO_STARSIZE 16
306 /* ********** Lamp (ID_LA) ********** */
320 #define LA_HALOINT 10
322 /* ********* Camera (ID_CA) ************ */
331 /* yafray aperture & focal distance curves */
332 #define CAM_YF_APERT 4
333 #define CAM_YF_FDIST 5
335 #define CAM_SHIFT_X 6
336 #define CAM_SHIFT_Y 7
338 /* ********* Sound (ID_SO) *********** */
345 #define SND_PANNING 3
348 /* ******* PoseChannel (ID_PO) ********* */
366 /* ******** Constraint (ID_CO) ********** */
372 #define CO_HEADTAIL 2
374 /* ****** FluidSim (ID_FLUIDSIM) ****** */
376 #define FLUIDSIM_TOTIPO 13
377 #define FLUIDSIM_TOTNAM 13
379 #define FLUIDSIM_VISC 1
380 #define FLUIDSIM_TIME 2
382 #define FLUIDSIM_GRAV_X 3
383 #define FLUIDSIM_GRAV_Y 4
384 #define FLUIDSIM_GRAV_Z 5
386 #define FLUIDSIM_VEL_X 6
387 #define FLUIDSIM_VEL_Y 7
388 #define FLUIDSIM_VEL_Z 8
390 #define FLUIDSIM_ACTIVE 9
392 #define FLUIDSIM_ATTR_FORCE_STR 10
393 #define FLUIDSIM_ATTR_FORCE_RADIUS 11
394 #define FLUIDSIM_VEL_FORCE_STR 12
395 #define FLUIDSIM_VEL_FORCE_RADIUS 13
397 /* ******************** */
400 /* ******* Particle (ID_PA) ******** */
401 #define PART_TOTIPO 25
402 #define PART_TOTNAM 25
404 #define PART_EMIT_FREQ 1
405 #define PART_EMIT_LIFE 2
406 #define PART_EMIT_VEL 3
407 #define PART_EMIT_AVE 4
408 #define PART_EMIT_SIZE 5
415 #define PART_LENGTH 11
416 #define PART_CLUMP 12
418 #define PART_GRAV_X 13
419 #define PART_GRAV_Y 14
420 #define PART_GRAV_Z 15
422 #define PART_KINK_AMP 16
423 #define PART_KINK_FREQ 17
424 #define PART_KINK_SHAPE 18
426 #define PART_BB_TILT 19
428 #define PART_PD_FSTR 20
429 #define PART_PD_FFALL 21
430 #define PART_PD_FMAXD 22
432 #define PART_PD2_FSTR 23
433 #define PART_PD2_FFALL 24
434 #define PART_PD2_FMAXD 25
437 /* -------------------- Defines: Flags and Types ------------------ */
439 /* ----- IPO Curve Defines ------- */
448 #define IPO_FLOAT_DEGR 6
450 /* very special case, in keys */
451 #define IPO_BEZTRIPLE 100
452 #define IPO_BPOINT 101
456 #define IPO_CHAR_BIT 16
457 #define IPO_SHORT_BIT 17
458 #define IPO_INT_BIT 18
460 /* icu->ipo: the type of curve */
474 #define IPO_VISIBLE 1
478 #define IPO_AUTO_HORIZ 16
479 #define IPO_ACTIVE 32
480 #define IPO_PROTECT 64
483 /* ---------- IPO Drivers ----------- */
485 /* offset in driver->name for finding second posechannel for rot-diff */
486 #define DRIVER_NAME_OFFS 32
489 #define IPO_DRIVER_TYPE_NORMAL 0
490 #define IPO_DRIVER_TYPE_PYTHON 1
493 /* invalid flag: currently only used for buggy pydriver expressions */
494 #define IPO_DRIVER_FLAG_INVALID (1<<0)