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-09-24 16:14:36 +0400
committerJoshua Leung <aligorith@gmail.com>2007-09-24 16:14:36 +0400
commit48095977757696b435c886a6f2c58f0eee6da30d (patch)
tree70471f87af020d78b899970ade608a29003507da /source/blender/src/drawipo.c
parentc4860afba3d1bf18dfc36bf2ec76332267394f5b (diff)
== NLA Editor ==
Added some features to the NLA Editor that had previously only been added for the Action Editor. * It is now possible to choose whether timing is displayed in Frames or Seconds like in many of the other Animation Editors. Use Ctrl-T or the View menu to change this. * Autosnap behaviour from Action Editor is now also available for the NLA Editor. It was partially done in the previous commit (for transform). Use the new combo-box on the NLA Editor header (like the one on the Action Editor header) to set this. * editaction.c: silenced a compiler warning from the previous commit related to a function which is no longer needed.
Diffstat (limited to 'source/blender/src/drawipo.c')
-rw-r--r--source/blender/src/drawipo.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c
index c860961639f..cf9e8c2ea28 100644
--- a/source/blender/src/drawipo.c
+++ b/source/blender/src/drawipo.c
@@ -230,6 +230,14 @@ void calc_ipogrid()
}
break;
}
+ case SPACE_NLA: {
+ SpaceNla *snla = curarea->spacedata.first;
+ if (snla->flag & SNLA_DRAWTIME) {
+ secondgrid = 1;
+ secondiv = 0.01 * (float)G.scene->r.frs_sec;
+ }
+ break;
+ }
default:
break;
}
@@ -241,7 +249,7 @@ void calc_ipogrid()
step_to_grid(&ipogrid_dx, &ipomachtx);
ipogrid_dx*= secondiv;
- if ELEM4(curarea->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_TIME, SPACE_ACTION) {
+ if ELEM5(curarea->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_TIME, SPACE_ACTION, SPACE_NLA) {
if(ipogrid_dx < 0.1) ipogrid_dx= 0.1;
ipomachtx-= 2;
if(ipomachtx<-2) ipomachtx= -2;
@@ -252,7 +260,7 @@ void calc_ipogrid()
ipogrid_dy= IPOSTEP*space/pixels;
step_to_grid(&ipogrid_dy, &ipomachty);
- if ELEM4(curarea->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_TIME, SPACE_ACTION) {
+ if ELEM5(curarea->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_TIME, SPACE_ACTION, SPACE_NLA) {
if(ipogrid_dy < 1.0) ipogrid_dy= 1.0;
if(ipomachty<1) ipomachty= 1;
}
@@ -983,6 +991,18 @@ void drawscroll(int disptype)
scroll_prstr(fac, 3.0+(float)(hor.ymin), val, 'h', disptype);
}
}
+ else if (curarea->spacetype==SPACE_NLA) {
+ SpaceNla *snla= curarea->spacedata.first;
+
+ if (snla->flag & SNLA_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);
}