From c356f3d68fe94134edfd5def4a9da7494c571e58 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 9 Jun 2007 07:24:08 +0000 Subject: == NLA Editor == Yet another commit to fix Shift-S snapping for keyframes. The code to snap an Object's IPO block's keyframes to the current frame should be evaluated before the expanded/collapsed status of said object is evaluated. --- source/blender/src/editnla.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source/blender') diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c index 4b6870581c1..85c6d6275c9 100644 --- a/source/blender/src/editnla.c +++ b/source/blender/src/editnla.c @@ -395,9 +395,16 @@ void snap_action_strips(int snap_mode) bActionStrip *strip; for (base=G.scene->base.first; base; base=base->next) { + /* object has ipo - these keyframes should be able to be snapped, even if strips are collapsed */ + if (base->object->ipo) { + snap_ipo_keys(base->object->ipo, snap_mode); + } + + /* object is collapsed - action and nla strips not shown/editable */ if (base->object->nlaflag & OB_NLA_COLLAPSED) continue; + /* snap action strips */ for (strip = base->object->nlastrips.last; strip; strip=strip->prev) { if (strip->flag & ACTSTRIP_SELECT) { if (snap_mode==1) { @@ -422,11 +429,6 @@ void snap_action_strips(int snap_mode) } } - /* object has ipo */ - if (base->object->ipo) { - snap_ipo_keys(base->object->ipo, snap_mode); - } - /* object has action */ if (base->object->action) { ListBase act_data = {NULL, NULL}; -- cgit v1.2.3