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/include')
-rw-r--r--source/blender/include/BDR_drawaction.h11
-rw-r--r--source/blender/include/BIF_editaction.h29
-rw-r--r--source/blender/include/BSE_editaction_types.h35
3 files changed, 52 insertions, 23 deletions
diff --git a/source/blender/include/BDR_drawaction.h b/source/blender/include/BDR_drawaction.h
index 673b13672c1..1753f4ecf42 100644
--- a/source/blender/include/BDR_drawaction.h
+++ b/source/blender/include/BDR_drawaction.h
@@ -38,6 +38,7 @@ struct Ipo;
struct IpoCurve;
struct gla2DDrawInfo;
struct bAction;
+struct bActionGroup;
struct Object;
struct ListBase;
@@ -75,14 +76,16 @@ void draw_cfra_action(void);
/* Channel Drawing */
void draw_icu_channel(struct gla2DDrawInfo *di, struct IpoCurve *icu, float ypos);
void draw_ipo_channel(struct gla2DDrawInfo *di, struct Ipo *ipo, float ypos);
-void draw_action_channel(struct gla2DDrawInfo *di, bAction *act, float ypos);
-void draw_object_channel(struct gla2DDrawInfo *di, Object *ob, float ypos);
+void draw_agroup_channel(struct gla2DDrawInfo *di, struct bActionGroup *agrp, float ypos);
+void draw_action_channel(struct gla2DDrawInfo *di, struct bAction *act, float ypos);
+void draw_object_channel(struct gla2DDrawInfo *di, struct Object *ob, float ypos);
/* Keydata Generation */
void icu_to_keylist(struct IpoCurve *icu, ListBase *keys, ListBase *blocks);
void ipo_to_keylist(struct Ipo *ipo, ListBase *keys, ListBase *blocks);
-void action_to_keylist(bAction *act, ListBase *keys, ListBase *blocks);
-void ob_to_keylist(Object *ob, ListBase *keys, ListBase *blocks);
+void agroup_to_keylist(struct bActionGroup *agrp, ListBase *keys, ListBase *blocks);
+void action_to_keylist(struct bAction *act, ListBase *keys, ListBase *blocks);
+void ob_to_keylist(struct Object *ob, ListBase *keys, ListBase *blocks);
#endif /* BDR_DRAWACTION_H */
diff --git a/source/blender/include/BIF_editaction.h b/source/blender/include/BIF_editaction.h
index 938d6d3d672..bea1edcc2ee 100644
--- a/source/blender/include/BIF_editaction.h
+++ b/source/blender/include/BIF_editaction.h
@@ -43,6 +43,7 @@
/* Some types for easier type-testing */
enum {
ACTTYPE_NONE= 0,
+ ACTTYPE_GROUP,
ACTTYPE_ACHAN,
ACTTYPE_CONCHAN,
ACTTYPE_ICU,
@@ -53,6 +54,10 @@ enum {
};
/* Macros for easier/more consistant state testing */
+#define EDITABLE_AGRP(agrp) ((agrp->flag & AGRP_PROTECTED)==0)
+#define EXPANDED_AGRP(agrp) (agrp->flag & AGRP_EXPANDED)
+#define SEL_AGRP(agrp) ((agrp->flag & AGRP_SELECTED) || (agrp->flag & AGRP_ACTIVE))
+
#define VISIBLE_ACHAN(achan) ((achan->flag & ACHAN_HIDDEN)==0)
#define EDITABLE_ACHAN(achan) ((VISIBLE_ACHAN(achan)) && ((achan->flag & ACHAN_PROTECTED)==0))
#define EXPANDED_ACHAN(achan) ((VISIBLE_ACHAN(achan)) && (achan->flag & ACHAN_EXPANDED))
@@ -81,7 +86,6 @@ enum {
/* constants for setting ipo-extrapolation type */
enum {
-
SET_EXTEND_MENU = 9,
SET_EXTEND_POPUP = 10,
@@ -91,9 +95,19 @@ enum {
SET_EXTEND_CYCLICEXTRAPOLATION
};
+/* constants for channel rearranging */
+/* WARNING: don't change exising ones without modifying rearrange func accordingly */
+enum {
+ REARRANGE_ACTCHAN_TOP= -2,
+ REARRANGE_ACTCHAN_UP= -1,
+ REARRANGE_ACTCHAN_DOWN= 1,
+ REARRANGE_ACTCHAN_BOTTOM= 2
+};
+
struct bAction;
struct bActionChannel;
+struct bActionGroup;
struct bPoseChannel;
struct Object;
struct Ipo;
@@ -125,11 +139,14 @@ void free_actcopybuf(void);
void copy_actdata(void);
void paste_actdata(void);
-/* Channel/strip operations */
-void up_sel_action(void);
-void down_sel_action(void);
-void top_sel_action(void);
-void bottom_sel_action(void);
+/* Group/Channel Operations */
+struct bActionGroup *get_active_actiongroup(struct bAction *act);
+void set_active_actiongroup(struct bAction *act, struct bActionGroup *agrp, short select);
+void action_groups_group(short add_group);
+void action_groups_ungroup(void);
+
+/* Channel/Strip Operations */
+void rearrange_action_channels(short mode);
void expand_all_action(void);
void openclose_level_action(short mode);
diff --git a/source/blender/include/BSE_editaction_types.h b/source/blender/include/BSE_editaction_types.h
index 48f0bc39ffc..ae61b09a13a 100644
--- a/source/blender/include/BSE_editaction_types.h
+++ b/source/blender/include/BSE_editaction_types.h
@@ -37,9 +37,12 @@
/* FILTERED ACTION DATA - TYPES */
/* types of keyframe data in ActListElem */
-#define ALE_NONE 0
-#define ALE_IPO 1
-#define ALE_ICU 2
+typedef enum ALE_KEYTYPE {
+ ALE_NONE = 0,
+ ALE_IPO,
+ ALE_ICU,
+ ALE_GROUP
+} ALE_KEYTYPE;
/* This struct defines a structure used for quick access */
typedef struct bActListElem {
@@ -53,6 +56,8 @@ typedef struct bActListElem {
void *key_data; /* motion data - ipo or ipo-curve */
short datatype; /* type of motion data to expect */
+ struct bActionGroup *grp; /* action group that owns the channel */
+
void *owner; /* will either be an action channel or fake ipo-channel (for keys) */
short ownertype; /* type of owner */
} bActListElem;
@@ -61,17 +66,21 @@ typedef struct bActListElem {
/* FILTER ACTION DATA - METHODS/TYPES */
/* filtering flags - under what circumstances should a channel be added */
-#define ACTFILTER_VISIBLE 0x001 /* should channels be visible */
-#define ACTFILTER_SEL 0x002 /* should channels be selected */
-#define ACTFILTER_FOREDIT 0x004 /* does editable status matter */
-#define ACTFILTER_CHANNELS 0x008 /* do we only care that it is a channel */
-#define ACTFILTER_IPOKEYS 0x010 /* only channels referencing ipo's */
-#define ACTFILTER_ONLYICU 0x020 /* only reference ipo-curves */
-#define ACTFILTER_FORDRAWING 0x040 /* make list for interface drawing */
+typedef enum ACTFILTER_FLAGS {
+ ACTFILTER_VISIBLE = (1<<0), /* should channels be visible */
+ ACTFILTER_SEL = (1<<1), /* should channels be selected */
+ ACTFILTER_FOREDIT = (1<<2), /* does editable status matter */
+ ACTFILTER_CHANNELS = (1<<3), /* do we only care that it is a channel */
+ ACTFILTER_IPOKEYS = (1<<4), /* only channels referencing ipo's */
+ ACTFILTER_ONLYICU = (1<<5), /* only reference ipo-curves */
+ ACTFILTER_FORDRAWING = (1<<6) /* make list for interface drawing */
+} ACTFILTER_FLAGS;
/* Action Editor - Main Data types */
-#define ACTCONT_NONE 0
-#define ACTCONT_ACTION 1
-#define ACTCONT_SHAPEKEY 2
+typedef enum ACTCONT_TYPES {
+ ACTCONT_NONE = 0,
+ ACTCONT_ACTION,
+ ACTCONT_SHAPEKEY
+} ACTCONT_TYPES;
#endif