diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-06-07 11:04:31 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-06-07 11:04:31 +0400 |
commit | 43c7c15e2be555454f54840307fd5ea7d61d0216 (patch) | |
tree | c8fe71124f24ee4e712b9e614ea5840fce5150a8 /source | |
parent | 34f29749c8d83b279dc0dd186da32018d0b30685 (diff) |
NLA SoC: 2 little tweaks
- Evaluation times for strips are now strictly clamped to the endpoints of the strips - i.e. if a strip has 'extend' on, the strip's evaluation time won't continue to change as time changes
- New NLA Editor instances now have auto-snapping turned on by default (as they should)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_nla/space_nla.c | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 44817b47860..3290e06dfb4 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -730,6 +730,16 @@ static void nlatrack_ctime_get_strip (ListBase *list, NlaTrack *nlt, short index */ if ((estrip == NULL) || (estrip->flag & NLASTRIP_FLAG_MUTED)) return; + + /* if ctime was not within the boundaries of the strip, clamp! */ + switch (side) { + case NES_TIME_BEFORE: /* extend first frame only */ + ctime= estrip->start; + break; + case NES_TIME_AFTER: /* extend last frame only */ + ctime= estrip->end; + break; + } /* evaluate strip's evaluation controls * - skip if no influence (i.e. same effect as muting the strip) diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 39579ec96da..32ced127831 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -79,6 +79,9 @@ static SpaceLink *nla_new(const bContext *C) /* allocate DopeSheet data for NLA Editor */ snla->ads= MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet"); + /* set auto-snapping settings */ + snla->autosnap = SACTSNAP_FRAME; + /* header */ ar= MEM_callocN(sizeof(ARegion), "header for nla"); |