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-08-10 16:10:03 +0400
committerJoshua Leung <aligorith@gmail.com>2007-08-10 16:10:03 +0400
commit246e675b60ea23e94c574ab0598ce902b0baae55 (patch)
treea0b94b3f28dc6d70d90159c35e78f0fbd82b8264 /source/blender/src/header_action.c
parent9776f489e6e205b0e0dd744764211ddb89037e65 (diff)
== Action Editor - Time Display ==
The Action Editor can now display timing in seconds too. By default, it still displays timing in frames, but it is possible to switch the time display to seconds. The hotkey to toggle this is Ctrl T. Notes: - Many of the Action Editor's tools have yet to be made aware of this. Therefore, they will still work as though frames are used. Only Transform, Snap, and Mirror should really be affected. This will be fixed when I wake up. - Nothing *should* be broken, but I might have missed something.
Diffstat (limited to 'source/blender/src/header_action.c')
-rw-r--r--source/blender/src/header_action.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c
index d39bd004eac..289629f8d91 100644
--- a/source/blender/src/header_action.c
+++ b/source/blender/src/header_action.c
@@ -89,6 +89,7 @@
#define ACTMENU_VIEW_SLIDERS 7
#define ACTMENU_VIEW_NEXTMARKER 8
#define ACTMENU_VIEW_PREVMARKER 9
+#define ACTMENU_VIEW_TIME 10
#define ACTMENU_SEL_BORDER 0
#define ACTMENU_SEL_BORDERM 1
@@ -255,6 +256,9 @@ static void do_action_viewmenu(void *arg, int event)
case ACTMENU_VIEW_PREVMARKER: /* jump to previous marker */
nextprev_marker(-1);
break;
+ case ACTMENU_VIEW_TIME: /* switch between frames and seconds display */
+ G.saction->flag ^= SACTION_DRAWTIME;
+ break;
}
allqueue(REDRAWVIEW3D, 0);
}
@@ -275,6 +279,21 @@ static uiBlock *action_viewmenu(void *arg_unused)
uiDefBut(block, SEPR, 0, "", 0, yco-=6,
menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ if (G.saction->flag & SACTION_DRAWTIME) {
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Show Frames|T", 0, yco-=20,
+ menuwidth, 19, NULL, 0.0, 0.0, 1,
+ ACTMENU_VIEW_TIME, "");
+ }
+ else {
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Show Seconds|T", 0, yco-=20,
+ menuwidth, 19, NULL, 0.0, 0.0, 1,
+ ACTMENU_VIEW_TIME, "");
+ }
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, (G.saction->flag & SACTION_SLIDERS)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
"Show Sliders|", 0, yco-=20,