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:
authorJoshua Leung <aligorith@gmail.com>2008-12-19 14:45:46 +0300
committerJoshua Leung <aligorith@gmail.com>2008-12-19 14:45:46 +0300
commitc752ec9fc458f6fd1fc0ae7a156d33bf86e73eff (patch)
tree8f559ef2cd1ce8a1c4ccee72096f34b1caf3c46f /source/blender/makesdna
parent242695011e71a358f466d4f78df3b9c66d739a64 (diff)
2.5
Merged 'backend' changes from AnimSys2. Many of these changes are necessary for the Dopesheet and other changes I'm currently still stabilising. Those will come in due course.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_action_types.h73
-rw-r--r--source/blender/makesdna/DNA_armature_types.h1
-rw-r--r--source/blender/makesdna/DNA_camera_types.h1
-rw-r--r--source/blender/makesdna/DNA_curve_types.h4
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h8
-rw-r--r--source/blender/makesdna/DNA_key_types.h3
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h5
-rw-r--r--source/blender/makesdna/DNA_material_types.h2
-rw-r--r--source/blender/makesdna/DNA_object_types.h13
-rw-r--r--source/blender/makesdna/DNA_space_types.h16
10 files changed, 105 insertions, 21 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 73a20512470..4095239bfed 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -22,6 +22,7 @@
*
* Contributor(s): Original design: Reevan McKay
* Contributor(s): Full recode, Ton Roosendaal, Crete 2005
+ * Contributor(s): Animation recode, Joshua Leung
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -70,9 +71,13 @@ typedef struct bPoseChannel {
void *dual_quat;
void *b_bone_dual_quats;
- float loc[3]; /* written in by actions or transform */
+ float loc[3]; /* transforms - written in by actions or transform */
float size[3];
+
+ float eul[3]; /* rotations - written in by actions or transform (but only euler/quat in use at any one time!) */
float quat[4];
+ short rotmode; /* for now either quat (0), or xyz-euler (1) */
+ short pad;
float chan_mat[4][4]; /* matrix result of loc/quat/size , and where we put deform in, see next line */
float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat */
@@ -166,30 +171,39 @@ typedef struct bAction {
ListBase markers; /* TimeMarkers local to this Action for labelling 'poses' */
int active_marker; /* Index of active-marker (first marker = 1) */
- int pad;
+ int flag; /* flags for this action */
} bAction;
/* ------------- Action Editor --------------------- */
+/* Storage for Dopesheet/Grease-Pencil Editor data */
+typedef struct bDopeSheet {
+ ID *source; /* currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil) */
+ ListBase chanbase; /* cache for channels (only initialised when pinned) */ // XXX not used!
+
+ int filterflag; /* flags to use for filtering data */
+ int flag; /* standard flags */
+} bDopeSheet;
+
/* Action Editor Space. This is defined here instead of in DNA_space_types.h */
typedef struct SpaceAction {
struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
float blockscale;
- struct ScrArea *area;
short blockhandler[8];
- View2D v2d;
+ View2D v2d; /* depricated, copied to region */
bAction *action; /* the currently active action */
+ bDopeSheet ads; /* the currently active context (when not showing action) */
char mode, autosnap; /* mode: editing context; autosnap: automatic keyframe snapping mode */
short flag, actnr; /* flag: bitmapped settings; */
short pin, lock; /* pin: keep showing current action; actnr: used for finding chosen action from menu; lock: lock time to other windows */
- short actwidth; /* width of the left-hand side name panel (in pixels?) */
+ short actwidth; /* width of the left-hand side name panel (in pixels?) */ // XXX depreceated!
float timeslide; /* for Time-Slide transform mode drawing - current frame? */
} SpaceAction;
@@ -220,6 +234,42 @@ typedef enum AGRP_FLAG {
AGRP_MOVED = (1<<31)
} AGRP_FLAG;
+
+/* 'Action' Channel flags */
+typedef enum ACT_FLAG {
+ ACTC_SELECTED = (1<<0),
+ ACTC_EXPANDED = (1<<1),
+} ACT_FLAG;
+
+/* ------------ DopeSheet Flags ------------------ */
+
+/* DopeSheet filter-flag */
+typedef enum DOPESHEET_FILTERFLAG {
+ /* general filtering */
+ ADS_FILTER_ONLYSEL = (1<<0),
+
+ /* datatype-based filtering */
+ ADS_FILTER_NOOBJ = (1<<4),
+ ADS_FILTER_NOARM = (1<<5),
+ ADS_FILTER_NOSHAPEKEYS = (1<<6),
+ ADS_FILTER_NOIPOS = (1<<7),
+ ADS_FILTER_NOACTS = (1<<8),
+ ADS_FILTER_NOCONSTRAINTS = (1<<9),
+ ADS_FILTER_NOCAM = (1<<10),
+ ADS_FILTER_NOMAT = (1<<11),
+ ADS_FILTER_NOLAM = (1<<12),
+ ADS_FILTER_NOCUR = (1<<13),
+
+ /* combination filters (some only used at runtime) */
+ ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR),
+ ADS_FILTER_NLADUMMY = (ADS_FILTER_NOACTS|ADS_FILTER_NOSHAPEKEYS|ADS_FILTER_NOOBDATA),
+} DOPESHEET_FILTERFLAG;
+
+/* DopeSheet general flags */
+//typedef enum DOPESHEET_FLAG {
+
+//} DOPESHEET_FLAG;
+
/* ------------ Action Editor Flags -------------- */
/* SpaceAction flag */
@@ -239,7 +289,9 @@ typedef enum SACTION_FLAG {
/* hack for moving pose-markers (temp flag) */
SACTION_POSEMARKERS_MOVE = (1<<6),
/* don't draw action channels using group colours (where applicable) */
- SACTION_NODRAWGCOLORS = (1<<7)
+ SACTION_NODRAWGCOLORS = (1<<7),
+ /* don't draw current frame number beside frame indicator */
+ SACTION_NODRAWCFRANUM = (1<<8),
} SACTION_FLAG;
/* SpaceAction Mode Settings */
@@ -250,7 +302,7 @@ typedef enum SACTCONT_MODES {
SACTCONT_SHAPEKEY,
/* editing of gpencil data */
SACTCONT_GPENCIL,
- /* dopesheet (unimplemented... future idea?) */
+ /* dopesheet */
SACTCONT_DOPESHEET
} SACTCONTEXT_MODES;
@@ -326,6 +378,13 @@ typedef enum PCHAN_IKFLAG {
BONE_IK_NO_ZDOF_TEMP = (1<<12)
} PCHAN_IKFLAG;
+/* PoseChannel->rotmode */
+typedef enum PCHAN_ROTMODE {
+ /* quaternion rotations (default, and for older Blender versions) */
+ PCHAN_ROT_QUAT = 0,
+ /* euler rotations (xyz only) */
+ PCHAN_ROT_EUL,
+} PCHAN_ROTMODE;
#endif
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index 93cb9f59860..790b9835b68 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -157,6 +157,7 @@ typedef enum eBone_Flag {
BONE_NO_CYCLICOFFSET = (1<<18), /* when no parent, bone will not get cyclic offset */
BONE_EDITMODE_LOCKED = (1<<19), /* bone transforms are locked in EditMode */
BONE_TRANSFORM_CHILD = (1<<20), /* Indicates that a parent is also being transformed */
+ BONE_UNSELECTABLE = (1<<21), /* bone cannot be selected */
} eBone_Flag;
#endif
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index 6db8358affe..cfca4523dd8 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -76,6 +76,7 @@ typedef struct Camera {
#define CAM_SHOWTITLESAFE 8
#define CAM_SHOWNAME 16
#define CAM_ANGLETOGGLE 32
+#define CAM_DS_EXPAND 64
/* yafray: dof sampling switch */
#define CAM_YF_NO_QMC 512
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index f809cac037d..eb8814171ce 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -88,7 +88,8 @@ typedef struct BevPoint {
typedef struct BezTriple {
float vec[3][3];
float alfa, weight, radius; /* alfa: tilt in 3D View, weight: used for softbody goal weight, radius: for bevel tapering */
- short h1, h2; /* h1, h2: the handle type of the two handles */
+ short ipo; /* ipo: interpolation mode for segment from this BezTriple to the next */
+ char h1, h2; /* h1, h2: the handle type of the two handles */
char f1, f2, f3, hide; /* f1, f2, f3: used for selection status, hide: used to indicate whether BezTriple is hidden */
} BezTriple;
@@ -204,6 +205,7 @@ typedef struct Curve {
#define CU_OFFS_PATHDIST 256
#define CU_FAST 512 /* Font: no filling inside editmode */
#define CU_RETOPO 1024
+#define CU_DS_EXPAND 2048
/* spacemode */
#define CU_LEFT 0
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
index 432399e3581..6d928646b3d 100644
--- a/source/blender/makesdna/DNA_ipo_types.h
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -349,8 +349,8 @@ typedef struct Ipo {
/* ******* PoseChannel (ID_PO) ********* */
-#define AC_TOTIPO 10
-#define AC_TOTNAM 10
+#define AC_TOTIPO 13
+#define AC_TOTNAM 13
#define AC_LOC_X 1
#define AC_LOC_Y 2
@@ -360,6 +360,10 @@ typedef struct Ipo {
#define AC_SIZE_Y 14
#define AC_SIZE_Z 15
+#define AC_EUL_X 16
+#define AC_EUL_Y 17
+#define AC_EUL_Z 18
+
#define AC_QUAT_W 25
#define AC_QUAT_X 26
#define AC_QUAT_Y 27
diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h
index 9e49bcfcb9a..13379c44a89 100644
--- a/source/blender/makesdna/DNA_key_types.h
+++ b/source/blender/makesdna/DNA_key_types.h
@@ -85,7 +85,8 @@ typedef struct Key {
#define KEY_BSPLINE 2
/* keyblock->flag */
-#define KEYBLOCK_MUTE 1
+#define KEYBLOCK_MUTE 1
+#define KEYBLOCK_DS_EXPAND 2
#endif
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index f8f2255c1a7..c544be7e388 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -45,7 +45,7 @@ struct CurveMapping;
typedef struct Lamp {
ID id;
- short type, pad3;
+ short type, flag;
int mode;
short colormodel, totex;
@@ -113,6 +113,9 @@ typedef struct Lamp {
/* **************** LAMP ********************* */
+/* flag */
+#define LA_DS_EXPAND 1
+
/* type */
#define LA_LOCAL 0
#define LA_SUN 1
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index d2bb93162d0..d3c294a3d36 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -154,6 +154,8 @@ typedef struct Material {
/* flag */
/* for render */
#define MA_IS_USED 1
+ /* for dopesheet */
+#define MA_DS_EXPAND 2
/* mode (is int) */
#define MA_TRACEBLE 1
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index b885bbf084e..f3d18e0559b 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -476,8 +476,17 @@ extern Object workob;
#define OB_SHAPE_TEMPLOCK 2
/* ob->nlaflag */
-#define OB_NLA_OVERRIDE 1
-#define OB_NLA_COLLAPSED 2
+#define OB_NLA_OVERRIDE (1<<0)
+#define OB_NLA_COLLAPSED (1<<1)
+
+ /* object-channel expanded status */
+#define OB_ADS_COLLAPSED (1<<10)
+ /* object's ipo-block */
+#define OB_ADS_SHOWIPO (1<<11)
+ /* object's constraint channels */
+#define OB_ADS_SHOWCONS (1<<12)
+ /* object's material channels */
+#define OB_ADS_SHOWMATS (1<<13)
/* ob->protectflag */
#define OB_LOCK_LOCX 1
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index d1af38b9e25..cdf29294197 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -98,7 +98,7 @@ typedef struct SpaceIpo {
short butofs, channel;
short showkey, blocktype;
short menunr, lock;
- int flag;
+ short flag, autosnap;
float median[3];
rctf tot;
} SpaceIpo;
@@ -108,9 +108,10 @@ typedef struct SpaceButs {
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
float blockscale;
- struct RenderInfo *ri;
-
+
short blockhandler[8];
+
+ struct RenderInfo *ri;
short cursens, curact;
short align, tabo; /* align for panels, tab is old tab */
@@ -638,10 +639,11 @@ typedef struct SpaceImaSel {
#define IMS_INFILESLI 4
/* nla->flag */
-#define SNLA_ALLKEYED 1
-#define SNLA_ACTIVELAYERS 2
-#define SNLA_DRAWTIME 4
-#define SNLA_NOTRANSKEYCULL 8
+#define SNLA_ALLKEYED (1<<0)
+#define SNLA_ACTIVELAYERS (1<<1)
+#define SNLA_DRAWTIME (1<<2)
+#define SNLA_NOTRANSKEYCULL (1<<3)
+#define SNLA_NODRAWCFRANUM (1<<4)
/* time->flag */
/* show timing in frames instead of in seconds */