Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesdna/DNA_ipo_types.h')
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h170
1 files changed, 120 insertions, 50 deletions
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
index 3954a500dc7..432399e3581 100644
--- a/source/blender/makesdna/DNA_ipo_types.h
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -24,7 +24,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): Joshua Leung
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -32,10 +32,54 @@
#define DNA_IPO_TYPES_H
#include "DNA_listBase.h"
+#include "DNA_curve_types.h"
#include "DNA_vec_types.h"
#include "DNA_ID.h"
+/* -------------------------- Type Defines --------------------------- */
+
+/* sometimes used - mainly for GE/Ketsji */
+typedef short IPO_Channel;
+
+
+/* --- IPO Curve Driver --- */
+
+/* IPO Curve Driver */
+typedef struct IpoDriver {
+ struct Object *ob; /* target/driver ob */
+ short blocktype, adrcode; /* sub-channel to use */
+
+ short type, flag; /* driver settings */
+ char name[128]; /* bone, or python expression here */
+} IpoDriver;
+
+/* --- IPO Curve --- */
+
+/* IPO Curve */
+typedef struct IpoCurve {
+ struct IpoCurve *next, *prev;
+
+ struct BPoint *bp; /* array of BPoints (sizeof(BPoint)*totvert) - i.e. baked/imported data */
+ struct BezTriple *bezt; /* array of BezTriples (sizeof(BezTriple)*totvert) - i.e. user-editable keyframes */
+
+ rctf maxrct, totrct; /* bounding boxes */
+
+ short blocktype, adrcode, vartype; /* blocktype= ipo-blocktype; adrcode= type of ipo-curve; vartype= 'format' of data */
+ short totvert; /* total number of BezTriples (i.e. keyframes) on curve */
+ short ipo, extrap; /* interpolation and extrapolation modes */
+ short flag, rt; /* flag= settings; rt= ??? */
+ float ymin, ymax; /* minimum/maximum y-extents for curve */
+ unsigned int bitmask; /* ??? */
+
+ float slide_min, slide_max; /* minimum/maximum values for sliders (in action editor) */
+ float curval; /* value of ipo-curve for current frame */
+
+ IpoDriver *driver; /* pointer to ipo-driver for this curve */
+} IpoCurve;
+
+/* --- ID-Datablock --- */
+
/* IPO Data-Block */
typedef struct Ipo {
ID id;
@@ -47,13 +91,9 @@ typedef struct Ipo {
short muteipo, pad; /* muteipo: either 0 or 1 (whether ipo block is muted) */
} Ipo;
-/* NOTE: IpoCurve struct is defined in DNA_curve_types.h, not in here... */
-
-/* sometimes used */
-typedef short IPO_Channel;
+/* ----------- adrcodes (for matching ipo-curves to data) ------------- */
/* defines: are these duped or new? */
-
#define IPOBUTY 17
#define TOB_IPO 1
@@ -64,7 +104,7 @@ typedef short IPO_Channel;
#define IPO_DISPBITS 2
#define IPO_DISPTIME 3
-/* ******************** */
+/* ********** Object (ID_OB) ********** */
#define OB_TOTIPO 30
#define OB_TOTNAM 30
@@ -110,7 +150,7 @@ typedef short IPO_Channel;
#define OB_ROT_DIFF 100
-/* ******************** */
+/* ********** Material (ID_MA) ********** */
#define MA_TOTIPO 40
#define MA_TOTNAM 26
@@ -142,16 +182,26 @@ typedef short IPO_Channel;
#define MA_FRESTRAI 25
#define MA_ADD 26
-#define MA_MAP1 0x20
-#define MA_MAP2 0x40
-#define MA_MAP3 0x80
-#define MA_MAP4 0x100
-#define MA_MAP5 0x200
-#define MA_MAP6 0x400
-#define MA_MAP7 0x800
-#define MA_MAP8 0x1000
-#define MA_MAP9 0x2000
-#define MA_MAP10 0x4000
+#define MA_MAP1 (1<<5)
+#define MA_MAP2 (1<<6)
+#define MA_MAP3 (1<<7)
+#define MA_MAP4 (1<<8)
+#define MA_MAP5 (1<<9)
+#define MA_MAP6 (1<<10)
+#define MA_MAP7 (1<<11)
+#define MA_MAP8 (1<<12)
+#define MA_MAP9 (1<<13)
+#define MA_MAP10 (1<<14)
+#define MA_MAP11 (1<<15)
+#define MA_MAP12 (1<<16)
+#define MA_MAP13 (1<<17)
+#define MA_MAP14 (1<<18)
+#define MA_MAP15 (1<<19)
+#define MA_MAP16 (1<<20)
+#define MA_MAP17 (1<<21)
+#define MA_MAP18 (1<<22)
+
+/* ********** Texture Slots (MTex) ********** */
#define TEX_TOTNAM 14
@@ -171,7 +221,7 @@ typedef short IPO_Channel;
#define MAP_VARF 13
#define MAP_DISP 14
-/* ******************** */
+/* ********** Texture (ID_TE) ********** */
#define TE_TOTIPO 26
#define TE_TOTNAM 26
@@ -208,21 +258,21 @@ typedef short IPO_Channel;
#define TE_BRIGHT 25
#define TE_CONTRA 26
-/* ******************** */
+/* ******** Sequence (ID_SEQ) ********** */
#define SEQ_TOTIPO 1
#define SEQ_TOTNAM 1
#define SEQ_FAC1 1
-/* ******************** */
+/* ********* Curve (ID_CU) *********** */
#define CU_TOTIPO 1
#define CU_TOTNAM 1
#define CU_SPEED 1
-/* ******************** */
+/* ********* ShapeKey (ID_KE) *********** */
#define KEY_TOTIPO 64
#define KEY_TOTNAM 64
@@ -230,7 +280,7 @@ typedef short IPO_Channel;
#define KEY_SPEED 0
#define KEY_NR 1
-/* ******************** */
+/* ********* World (ID_WO) *********** */
#define WO_TOTIPO 29
#define WO_TOTNAM 16
@@ -255,7 +305,7 @@ typedef short IPO_Channel;
#define WO_STARDIST 15
#define WO_STARSIZE 16
-/* ******************** */
+/* ********** Lamp (ID_LA) ********** */
#define LA_TOTIPO 21
#define LA_TOTNAM 10
@@ -271,9 +321,8 @@ typedef short IPO_Channel;
#define LA_QUAD2 9
#define LA_HALOINT 10
-/* ******************** */
+/* ********* Camera (ID_CA) ************ */
-/* yafray: totipo & totnam +2 because of added curves */
#define CAM_TOTIPO 7
#define CAM_TOTNAM 7
@@ -288,7 +337,7 @@ typedef short IPO_Channel;
#define CAM_SHIFT_X 6
#define CAM_SHIFT_Y 7
-/* ******************** */
+/* ********* Sound (ID_SO) *********** */
#define SND_TOTIPO 4
#define SND_TOTNAM 4
@@ -298,9 +347,9 @@ typedef short IPO_Channel;
#define SND_PANNING 3
#define SND_ATTEN 4
-/* ******************** */
+/* ******* PoseChannel (ID_PO) ********* */
-#define AC_TOTIPO 10 /* __NLA */
+#define AC_TOTIPO 10
#define AC_TOTNAM 10
#define AC_LOC_X 1
@@ -316,28 +365,18 @@ typedef short IPO_Channel;
#define AC_QUAT_Y 27
#define AC_QUAT_Z 28
-/* ******************** */
-#define CO_TOTIPO 2 /* Constraint Ipos */
+/* ******** Constraint (ID_CO) ********** */
+
+#define CO_TOTIPO 2
#define CO_TOTNAM 2
#define CO_ENFORCE 1
#define CO_HEADTAIL 2
-/*
-#define CO_TIME 2
-#define CO_OFFSET_X 3
-#define CO_OFFSET_Y 4
-#define CO_OFFSET_Z 5
-#define CO_ORIENT_X 6
-#define CO_ORIENT_Y 7
-#define CO_ORIENT_Z 8
-#define CO_ROLL 9
-*/
-/* ******************** */
-/* fluidsim ipos NT */
+/* ****** FluidSim (ID_FLUIDSIM) ****** */
-#define FLUIDSIM_TOTIPO 9
-#define FLUIDSIM_TOTNAM 9
+#define FLUIDSIM_TOTIPO 13
+#define FLUIDSIM_TOTNAM 13
#define FLUIDSIM_VISC 1
#define FLUIDSIM_TIME 2
@@ -352,10 +391,17 @@ typedef short IPO_Channel;
#define FLUIDSIM_ACTIVE 9
+#define FLUIDSIM_ATTR_FORCE_STR 10
+#define FLUIDSIM_ATTR_FORCE_RADIUS 11
+#define FLUIDSIM_VEL_FORCE_STR 12
+#define FLUIDSIM_VEL_FORCE_RADIUS 13
+
/* ******************** */
/* particle ipos */
-#define PART_TOTIPO 19
-#define PART_TOTNAM 19
+
+/* ******* Particle (ID_PA) ******** */
+#define PART_TOTIPO 25
+#define PART_TOTNAM 25
#define PART_EMIT_FREQ 1
#define PART_EMIT_LIFE 2
@@ -381,9 +427,18 @@ typedef short IPO_Channel;
#define PART_BB_TILT 19
+#define PART_PD_FSTR 20
+#define PART_PD_FFALL 21
+#define PART_PD_FMAXD 22
+
+#define PART_PD2_FSTR 23
+#define PART_PD2_FFALL 24
+#define PART_PD2_FMAXD 25
+
+
+/* -------------------- Defines: Flags and Types ------------------ */
-/* these are IpoCurve specific */
-/* **************** IPO ********************* */
+/* ----- IPO Curve Defines ------- */
/* icu->vartype */
#define IPO_CHAR 0
@@ -393,6 +448,7 @@ typedef short IPO_Channel;
#define IPO_FLOAT 4
#define IPO_DOUBLE 5
#define IPO_FLOAT_DEGR 6
+
/* very special case, in keys */
#define IPO_BEZTRIPLE 100
#define IPO_BPOINT 101
@@ -407,7 +463,8 @@ typedef short IPO_Channel;
#define IPO_CONST 0
#define IPO_LIN 1
#define IPO_BEZ 2
-#define IPO_MIXED 3 /* not used yet */
+ /* not used yet */
+#define IPO_MIXED 3
/* icu->extrap */
#define IPO_HORIZ 0
@@ -425,6 +482,19 @@ typedef short IPO_Channel;
#define IPO_PROTECT 64
#define IPO_MUTE 128
+/* ---------- IPO Drivers ----------- */
+
+/* offset in driver->name for finding second posechannel for rot-diff */
+#define DRIVER_NAME_OFFS 32
+
+/* driver->type */
+#define IPO_DRIVER_TYPE_NORMAL 0
+#define IPO_DRIVER_TYPE_PYTHON 1
+
+/* driver->flag */
+ /* invalid flag: currently only used for buggy pydriver expressions */
+#define IPO_DRIVER_FLAG_INVALID (1<<0)
+
#endif