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/drawipo.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/drawipo.c')
-rw-r--r--source/blender/src/drawipo.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c
index 1bbec20cd49..29f56fade34 100644
--- a/source/blender/src/drawipo.c
+++ b/source/blender/src/drawipo.c
@@ -219,6 +219,15 @@ void calc_ipogrid()
secondgrid = 1;
secondiv = 0.01 * (float)G.scene->r.frs_sec;
}
+ break;
+ }
+ case SPACE_ACTION: {
+ SpaceAction *saction = curarea->spacedata.first;
+ if (saction->flag & SACTION_DRAWTIME) {
+ secondgrid = 1;
+ secondiv = 0.01 * (float)G.scene->r.frs_sec;
+ }
+ break;
}
default:
break;
@@ -231,7 +240,7 @@ void calc_ipogrid()
step_to_grid(&ipogrid_dx, &ipomachtx);
ipogrid_dx*= secondiv;
- if ELEM3(curarea->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_TIME) {
+ if ELEM4(curarea->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_TIME, SPACE_ACTION) {
if(ipogrid_dx < 0.1) ipogrid_dx= 0.1;
ipomachtx-= 2;
if(ipomachtx<-2) ipomachtx= -2;
@@ -242,7 +251,7 @@ void calc_ipogrid()
ipogrid_dy= IPOSTEP*space/pixels;
step_to_grid(&ipogrid_dy, &ipomachty);
- if ELEM3(curarea->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_TIME) {
+ if ELEM4(curarea->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_TIME, SPACE_ACTION) {
if(ipogrid_dy < 1.0) ipogrid_dy= 1.0;
if(ipomachty<1) ipomachty= 1;
}
@@ -949,6 +958,18 @@ void drawscroll(int disptype)
else
scroll_prstr(fac, 3.0+(float)(hor.ymin), val, 'h', disptype);
}
+ else if (curarea->spacetype==SPACE_ACTION) {
+ SpaceAction *saction= curarea->spacedata.first;
+
+ if (saction->flag & SACTION_DRAWTIME) {
+ fac2= val/(float)G.scene->r.frs_sec;
+ scroll_prstr(fac, 3.0+(float)(hor.ymin), fac2, 'h', disptype);
+ }
+ else {
+ ipomachtx= 1;
+ scroll_prstr(fac, 3.0+(float)(hor.ymin), val, 'h', disptype);
+ }
+ }
else {
scroll_prstr(fac, 3.0+(float)(hor.ymin), val, 'h', disptype);
}