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>2007-12-06 12:41:46 +0300
committerJoshua Leung <aligorith@gmail.com>2007-12-06 12:41:46 +0300
commitac6efff0d7fce56553244d9cd6f0c3e989bb953c (patch)
treee279a15fcb314e791426b2da12be75de47618f67 /source/blender/src/header_action.c
parentdf1db2073759939fb8bec905eb99321efc3bd04b (diff)
== Action Editor - Snap Current-Frame Marker to Keys ==
This little feature snaps the current frame marker to the average frame of all the selected keyframes. Use the hotkey Ctrl-Shift-S to use it.
Diffstat (limited to 'source/blender/src/header_action.c')
-rw-r--r--source/blender/src/header_action.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c
index ada923c44eb..6d01dcf6bab 100644
--- a/source/blender/src/header_action.c
+++ b/source/blender/src/header_action.c
@@ -158,6 +158,7 @@ enum {
ACTMENU_KEY_SNAP_CURFRAME,
ACTMENU_KEY_SNAP_NEARMARK,
ACTMENU_KEY_SNAP_NEARTIME,
+ ACTMENU_KEY_SNAP_CFRA2KEY,
};
enum {
@@ -872,6 +873,10 @@ static void do_action_keymenu_snapmenu(void *arg, int event)
case ACTMENU_KEY_SNAP_NEARTIME:
snap_action_keys(event);
break;
+
+ case ACTMENU_KEY_SNAP_CFRA2KEY:
+ snap_cfra_action();
+ break;
}
scrarea_queue_winredraw(curarea);
@@ -888,27 +893,35 @@ static uiBlock *action_keymenu_snapmenu(void *arg_unused)
if (G.saction->flag & SACTION_DRAWTIME) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Nearest Second|Shift S, 1", 0, yco-=20,
+ "Key -> Nearest Second|Shift S, 1", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_KEY_SNAP_NEARTIME, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Current Time|Shift S, 2", 0, yco-=20,
+ "Key -> Current Time|Shift S, 2", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_KEY_SNAP_CURFRAME, "");
}
else {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Nearest Frame|Shift S, 1", 0, yco-=20,
+ "Key -> Nearest Frame|Shift S, 1", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_KEY_SNAP_NEARFRAME, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Current Frame|Shift S, 2", 0, yco-=20,
+ "Key -> Current Frame|Shift S, 2", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_KEY_SNAP_CURFRAME, "");
}
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Nearest Marker|Shift S, 3", 0, yco-=20,
+ "Key -> Nearest Marker|Shift S, 3", 0, yco-=20,
+ menuwidth, 19, NULL, 0.0, 0.0, 0,
+ ACTMENU_KEY_SNAP_NEARMARK, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6,
+ menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Current Frame -> Key|Ctrl Shift S", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_KEY_SNAP_NEARMARK, "");