diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-01-20 14:07:42 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-01-20 14:07:42 +0300 |
commit | 8c479bc9332bcb4a3b6b0e47346287f491532729 (patch) | |
tree | 29736f74287c57d594b1397cf33e46260ba4ea1b /source/blender/editors/include | |
parent | 42c8b6a684b9db3b022542f6aaef49d74ddcd3e6 (diff) |
Animato - Restoring most of Action Editor
* Streamlined the filtering code to remove a few redundant options, which required tweaking the code for most tools
* F-Curves are simply displayed using their full paths right now. This should eventually be the UI-string stored in RNA, but right now there are still a few missing things.
* There are a few tools which are not available yet which were available in 2.5 before Animato was added:
- Copy/Paste
- Rearrange channels
Also, the DopeSheet is not totally functional (in terms of displaying animation data for sub-object data yet). That will be added tomorrow.
* Added 'Action Group' pointer to F-Curves, as it will be handy for allowing Bone channels to still remain grouped as they were before with the Action Channels. However, reintroducing such a structure to the data-storage is not anticipated...
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 62 | ||||
-rw-r--r-- | source/blender/editors/include/ED_keyframes_draw.h | 9 | ||||
-rw-r--r-- | source/blender/editors/include/ED_keyframes_edit.h | 14 |
3 files changed, 23 insertions, 62 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 4b58aa4a6c8..a334242b655 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -40,8 +40,8 @@ struct View2D; struct gla2DDrawInfo; struct Object; struct bActionGroup; -struct Ipo; -struct IpoCurve; +struct FCurve; +struct IpoCurve; // xxx /* ************************************************ */ /* ANIMATION CHANNEL FILTERING */ @@ -74,7 +74,7 @@ typedef enum eAnimCont_Types { ANIMCONT_SHAPEKEY, /* shapekey (Key) */ ANIMCONT_GPENCIL, /* grease pencil (screen) */ ANIMCONT_DOPESHEET, /* dopesheet (bDopesheet) */ - ANIMCONT_IPO, /* single IPO (Ipo) */ + ANIMCONT_IPO, /* single IPO (Ipo) */ // XXX } eAnimCont_Types; /* --------------- Channels -------------------- */ @@ -109,13 +109,9 @@ typedef enum eAnim_ChannelType { ANIMTYPE_OBJECT, ANIMTYPE_GROUP, - - ANIMTYPE_FILLIPO, - ANIMTYPE_FILLCON, + ANIMTYPE_FCURVE, ANIMTYPE_FILLACTD, - ANIMTYPE_FILLIPOD, - ANIMTYPE_FILLCOND, ANIMTYPE_FILLMATD, ANIMTYPE_DSMAT, @@ -124,13 +120,8 @@ typedef enum eAnim_ChannelType { ANIMTYPE_DSCUR, ANIMTYPE_DSSKEY, - ANIMTYPE_ACHAN, - ANIMTYPE_CONCHAN, - ANIMTYPE_CONCHAN2, - ANIMTYPE_ICU, - ANIMTYPE_IPO, + ANIMTYPE_SHAPEKEY, // XXX probably can become depreceated??? - ANIMTYPE_SHAPEKEY, ANIMTYPE_GPDATABLOCK, ANIMTYPE_GPLAYER, } eAnim_ChannelType; @@ -138,8 +129,7 @@ typedef enum eAnim_ChannelType { /* types of keyframe data in bAnimListElem */ typedef enum eAnim_KeyType { ALE_NONE = 0, /* no keyframe data */ - ALE_IPO, /* IPO block */ - ALE_ICU, /* IPO-Curve block */ + ALE_FCURVE, /* F-Curve */ ALE_GPFRAME, /* Grease Pencil Frames */ // XXX the following are for summaries... should these be kept? @@ -156,23 +146,20 @@ typedef enum eAnimFilter_Flags { ANIMFILTER_VISIBLE = (1<<0), /* should channels be visible */ ANIMFILTER_SEL = (1<<1), /* should channels be selected */ ANIMFILTER_FOREDIT = (1<<2), /* does editable status matter */ - ANIMFILTER_CHANNELS = (1<<3), /* do we only care that it is a channel */ - ANIMFILTER_IPOKEYS = (1<<4), /* only channels referencing ipo's */ - ANIMFILTER_ONLYFCU = (1<<5), /* only reference ipo-curves */ - ANIMFILTER_FORDRAWING = (1<<6), /* make list for interface drawing */ - ANIMFILTER_ACTGROUPED = (1<<7), /* belongs to the active actiongroup */ + ANIMFILTER_CURVESONLY = (1<<3), /* don't include summary-channels, etc. */ + ANIMFILTER_CHANNELS = (1<<4), /* make list for interface drawing */ + ANIMFILTER_ACTGROUPED = (1<<5), /* belongs to the active actiongroup */ } eAnimFilter_Flags; /* ---------- Flag Checking Macros ------------ */ +// xxx check on all of these flags again... /* Dopesheet only */ /* 'Object' channels */ #define SEL_OBJC(base) ((base->flag & SELECT)) #define EXPANDED_OBJC(ob) ((ob->nlaflag & OB_ADS_COLLAPSED)==0) /* 'Sub-object' channels (flags stored in Object block) */ -#define FILTER_IPO_OBJC(ob) ((ob->nlaflag & OB_ADS_SHOWIPO)) -#define FILTER_CON_OBJC(ob) ((ob->nlaflag & OB_ADS_SHOWCONS)) #define FILTER_MAT_OBJC(ob) ((ob->nlaflag & OB_ADS_SHOWMATS)) /* 'Sub-object' channels (flags stored in Data block) */ #define FILTER_SKE_OBJD(key) ((key->flag & KEYBLOCK_DS_EXPAND)) @@ -181,31 +168,17 @@ typedef enum eAnimFilter_Flags { #define FILTER_CAM_OBJD(ca) ((ca->flag & CAM_DS_EXPAND)) #define FILTER_CUR_OBJD(cu) ((cu->flag & CU_DS_EXPAND)) /* 'Sub-object/Action' channels (flags stored in Action) */ - // XXX temp flags for things removed -#define ACTC_SELECTED 1 -#define ACTC_EXPANDED 2 - // XXX these need to be fixed -#define SEL_ACTC(actc) ((actc->flag & ACTC_SELECTED)) -#define EXPANDED_ACTC(actc) ((actc->flag & ACTC_EXPANDED)) +#define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED)) +#define EXPANDED_ACTC(actc) ((actc->flag & ACT_EXPANDED)) /* Actions (also used for Dopesheet) */ /* Action Channel Group */ #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)) - /* Action Channel Settings */ -#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)) -#define SEL_ACHAN(achan) ((achan->flag & ACHAN_SELECTED) || (achan->flag & ACHAN_HILIGHTED)) -#define FILTER_IPO_ACHAN(achan) ((achan->flag & ACHAN_SHOWIPO)) -#define FILTER_CON_ACHAN(achan) ((achan->flag & ACHAN_SHOWCONS)) - /* Constraint Channel Settings */ -#define EDITABLE_CONCHAN(conchan) ((conchan->flag & CONSTRAINT_CHANNEL_PROTECTED)==0) -#define SEL_CONCHAN(conchan) (conchan->flag & CONSTRAINT_CHANNEL_SELECT) - /* IPO Curve Channels */ -#define EDITABLE_ICU(icu) ((icu->flag & IPO_PROTECT)==0) -#define SEL_ICU(icu) (icu->flag & IPO_SELECT) + /* F-Curve Channels */ +#define EDITABLE_FCU(fcu) ((fcu->flag & FCURVE_PROTECTED)==0) +#define SEL_FCU(fcu) (fcu->flag & (FCURVE_ACTIVE|FCURVE_SELECTED)) /* Grease Pencil only */ /* Grease Pencil datablock settings */ @@ -301,7 +274,7 @@ void ANIM_draw_previewrange(const struct bContext *C, struct View2D *v2d); /* anim_ipo_utils.c */ int geticon_ipo_blocktype(short blocktype); -char *getname_ipocurve(struct IpoCurve *icu, struct Object *ob); +char *getname_ipocurve(struct IpoCurve *icu, struct Object *ob); // XXX unsigned int ipo_rainbow(int cur, int tot); @@ -316,8 +289,7 @@ struct Object *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale); void ANIM_nla_mapping_draw(struct gla2DDrawInfo *di, struct Object *ob, short restore); /* Apply/Unapply NLA mapping to all keyframes in the nominated IPO block */ -void ANIM_nla_mapping_apply_ipocurve(struct Object *ob, struct IpoCurve *icu, short restore, short only_keys); -void ANIM_nla_mapping_apply_ipo(struct Object *ob, struct Ipo *ipo, short restore, short only_keys); +void ANIM_nla_mapping_apply_fcurve(struct Object *ob, struct FCurve *fcu, short restore, short only_keys); /* ------------- xxx macros ----------------------- */ diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 7a9aeef5883..b9308b6d8a6 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -31,8 +31,7 @@ #define ED_KEYFRAMES_DRAW_H struct BezTriple; -struct Ipo; -struct IpoCurve; +struct FCurve; struct gla2DDrawInfo; struct bAction; struct bActionGroup; @@ -79,16 +78,14 @@ typedef struct ActKeysInc { /* ******************************* Methods ****************************** */ /* Channel Drawing */ -void draw_icu_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct IpoCurve *icu, float ypos); -void draw_ipo_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct Ipo *ipo, float ypos); +void draw_fcurve_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct FCurve *fcu, float ypos); void draw_agroup_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct bActionGroup *agrp, float ypos); void draw_action_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct bAction *act, float ypos); void draw_object_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct Object *ob, float ypos); void draw_gpl_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct bGPDlayer *gpl, float ypos); /* Keydata Generation */ -void icu_to_keylist(struct IpoCurve *icu, ListBase *keys, ListBase *blocks, ActKeysInc *aki); -void ipo_to_keylist(struct Ipo *ipo, ListBase *keys, ListBase *blocks, ActKeysInc *aki); +void fcurve_to_keylist(struct FCurve *fcu, ListBase *keys, ListBase *blocks, ActKeysInc *aki); void agroup_to_keylist(struct bActionGroup *agrp, ListBase *keys, ListBase *blocks, ActKeysInc *aki); void action_to_keylist(struct bAction *act, ListBase *keys, ListBase *blocks, ActKeysInc *aki); void action_nlascaled_to_keylist(struct Object *ob, struct bAction *act, ListBase *keys, ListBase *blocks, ActKeysInc *aki); diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 77d41ace857..cac32b18036 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -30,8 +30,6 @@ #define ED_KEYFRAMES_EDIT_H struct bAnimContext; -struct Ipo; -struct IpoCurve; struct FCurve; struct BezTriple; struct Scene; @@ -99,15 +97,14 @@ typedef struct BeztEditData { /* ------- Function Pointer Typedefs ---------------- */ /* callback function that refreshes the IPO curve after use */ -typedef void (*IcuEditFunc)(struct IpoCurve *icu); +typedef void (*FcuEditFunc)(struct FCurve *fcu); /* callback function that operates on the given BezTriple */ typedef short (*BeztEditFunc)(BeztEditData *bed, struct BezTriple *bezt); /* ---------------- Looping API --------------------- */ /* functions for looping over keyframes */ -short ANIM_icu_keys_bezier_loop(BeztEditData *bed, struct IpoCurve *icu, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, IcuEditFunc icu_cb); -short ANIM_ipo_keys_bezier_loop(BeztEditData *bed, struct Ipo *ipo, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, IcuEditFunc icu_cb); +short ANIM_fcurve_keys_bezier_loop(BeztEditData *bed, struct FCurve *Fcu, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb); /* functions for making sure all keyframes are in good order */ void ANIM_editkeyframes_refresh(struct bAnimContext *ac); @@ -124,15 +121,11 @@ BeztEditFunc ANIM_editkeyframes_select(short mode); BeztEditFunc ANIM_editkeyframes_handles(short mode); BeztEditFunc ANIM_editkeyframes_ipo(short mode); -/* ---------- IpoCurve Callbacks ------------ */ - -void ANIM_editkeyframes_ipocurve_ipotype(struct IpoCurve *icu); - /* ************************************************ */ /* Destructive Editing API (keyframes_general.c) */ void delete_fcurve_key(struct FCurve *fcu, int index, short do_recalc); -void delete_ipo_keys(struct Ipo *ipo); +void delete_fcurve_keys(struct FCurve *fcu); void duplicate_ipo_keys(struct Ipo *ipo); void clean_fcurve(struct FCurve *fcu, float thresh); @@ -146,7 +139,6 @@ void smooth_fcurve(struct FCurve *fcu, short mode); short is_ipo_key_selected(struct Ipo *ipo); void set_ipo_key_selection(struct Ipo *ipo, short sel); -void setexprap_ipoloop(struct Ipo *ipo, short code); /* ************************************************ */ |