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>2009-09-04 06:44:56 +0400
committerJoshua Leung <aligorith@gmail.com>2009-09-04 06:44:56 +0400
commitfa01703ac3caf08c42509e17be94559efd69bd2b (patch)
tree4223b41fcb09043543ffcdae93baf8330d4eea4d /source/blender/editors/include
parent640e39206b25bcd433223d85298961a860fc5cd7 (diff)
2.5 - Keyframe Types for DopeSheet
It is now possible to tag certain keyframes as being 'breakdowns' in the DopeSheet. Breakdown keyframes are drawn as slightly smaller blue diamonds. Simply select the relevant keyframes and use the RKEY hotkey (or from the menus, Key->Keyframe Type) to choose between tagging the keyframe as a 'proper' keyframe and a 'breakdown' keyframe. Notes: * Please note that this feature does not currently imply anything about breakdowns moving around keyframes or behaving any differently from any other type of keyframe * In future, if there is any such need, more keyframe types could be added, though this is not really likely at all
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_anim_api.h7
-rw-r--r--source/blender/editors/include/ED_keyframes_draw.h6
-rw-r--r--source/blender/editors/include/ED_keyframes_edit.h3
3 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 179f362b13f..af37cd87254 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -434,7 +434,12 @@ void ED_nla_postop_refresh(bAnimContext *ac);
/* ------------- Utility macros ----------------------- */
/* checks if the given BezTriple is selected */
-#define BEZSELECTED(bezt) ((bezt->f2 & SELECT) || (bezt->f1 & SELECT) || (bezt->f3 & SELECT))
+#define BEZSELECTED(bezt) (((bezt)->f2 & SELECT) || ((bezt)->f1 & SELECT) || ((bezt)->f3 & SELECT))
+
+/* provide access to Keyframe Type info in BezTriple
+ * NOTE: this is so that we can change it from being stored in 'hide'
+ */
+#define BEZKEYTYPE(bezt) ((bezt)->hide)
/* set/clear/toggle macro
* - channel - channel with a 'flag' member that we're setting
diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h
index e940aaed36e..259104f7263 100644
--- a/source/blender/editors/include/ED_keyframes_draw.h
+++ b/source/blender/editors/include/ED_keyframes_draw.h
@@ -56,8 +56,8 @@ typedef struct ActKeyColumn {
char tree_col; /* DLRB_BLACK or DLRB_RED */
/* keyframe info */
- char sel;
- short handle_type;
+ char key_type; /* eBezTripe_KeyframeType */
+ short sel;
float cfra;
/* only while drawing - used to determine if long-keyframe needs to be drawn */
@@ -99,7 +99,7 @@ typedef enum eKeyframeShapeDrawOpts {
} eKeyframeShapeDrawOpts;
/* draw simple diamond-shape keyframe (with OpenGL) */
-void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel, short mode);
+void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel, short key_type, short mode);
/* ******************************* Methods ****************************** */
diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h
index 77e95dc77de..390729eaec4 100644
--- a/source/blender/editors/include/ED_keyframes_edit.h
+++ b/source/blender/editors/include/ED_keyframes_edit.h
@@ -40,8 +40,6 @@ struct Scene;
/* --------- BezTriple Selection ------------- */
-#define BEZSELECTED(bezt) ((bezt->f2 & SELECT) || (bezt->f1 & SELECT) || (bezt->f3 & SELECT))
-
#define BEZ_SEL(bezt) { (bezt)->f1 |= SELECT; (bezt)->f2 |= SELECT; (bezt)->f3 |= SELECT; }
#define BEZ_DESEL(bezt) { (bezt)->f1 &= ~SELECT; (bezt)->f2 &= ~SELECT; (bezt)->f3 &= ~SELECT; }
#define BEZ_INVSEL(bezt) { (bezt)->f1 ^= SELECT; (bezt)->f2 ^= SELECT; (bezt)->f3 ^= SELECT; }
@@ -133,6 +131,7 @@ BeztEditFunc ANIM_editkeyframes_mirror(short mode);
BeztEditFunc ANIM_editkeyframes_select(short mode);
BeztEditFunc ANIM_editkeyframes_handles(short mode);
BeztEditFunc ANIM_editkeyframes_ipo(short mode);
+BeztEditFunc ANIM_editkeyframes_keytype(short mode);
/* ----------- BezTriple Callback (Assorted Utilities) ---------- */