diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-09-24 16:14:36 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-09-24 16:14:36 +0400 |
commit | 48095977757696b435c886a6f2c58f0eee6da30d (patch) | |
tree | 70471f87af020d78b899970ade608a29003507da /source/blender/src/transform.c | |
parent | c4860afba3d1bf18dfc36bf2ec76332267394f5b (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/transform.c')
-rw-r--r-- | source/blender/src/transform.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 3189e959ede..1038e141299 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -3249,6 +3249,24 @@ static short getAnimEdit_SnapMode(TransInfo *t) break; } } + else if (t->spacetype == SPACE_NLA && G.snla) { + switch (G.snla->autosnap) { + case SACTSNAP_OFF: + if (G.qual == LR_CTRLKEY) + autosnap= SACTSNAP_STEP; + else if (G.qual == LR_SHIFTKEY) + autosnap= SACTSNAP_FRAME; + else + autosnap= SACTSNAP_OFF; + break; + case SACTSNAP_STEP: + autosnap= (G.qual==LR_CTRLKEY)? SACTSNAP_OFF: SACTSNAP_STEP; + break; + case SACTSNAP_FRAME: + autosnap= (G.qual==LR_SHIFTKEY)? SACTSNAP_OFF: SACTSNAP_FRAME; + break; + } + } else { if (G.qual == LR_CTRLKEY) autosnap= SACTSNAP_STEP; @@ -3271,10 +3289,10 @@ static short getAnimEdit_DrawTime(TransInfo *t) /* currently, some of these are only for the action editor */ if (t->spacetype == SPACE_ACTION && G.saction) { - if (G.saction->flag & SACTION_DRAWTIME) - drawtime = 1; - else - drawtime = 0; + drawtime = (G.saction->flag & SACTION_DRAWTIME)? 1 : 0; + } + else if (t->spacetype == SPACE_NLA && G.snla) {= + drawtime = (G.snla->flag & SNLA_DRAWTIME)? 1 : 0; } else { drawtime = 0; |