From db4609eb08fe6e76a98d501de18c6fcc40e9148b Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 7 Nov 2010 12:09:15 +0000 Subject: Animation Editors: Channel Reordering This commit restores the ability to reorder channels in the animation editors (DopeSheet/Action/etc., Graph/Drivers, NLA). The hotkeys for this are: - Shift-PageUp = Move Up - Shift-PageDown = Move Down - Ctrl-Shift-PageUp = Move to Top of List - Ctrl-Shift-PageDown = Move to Bottom of List Do note that only animation data can get reordered using this. So, do not expect to be able to change the object order (that is actually taken from the order that Blender actually evaluates them per update/frame). --- In the process, I've fixed a couple of other bugs: * Removed 'optimisation step' check in anim_filter.c for dopesheet with no filtering options modified, since this meant that the ANIMFILTER_ANIMDATA data filter was not getting processed (and potentially there were other maintenance problems with that). * Made NLA Editor's channel list not totally duplicate the basic Animation Channels keymap. Instead, the "NLA Channels" keymap now only defines the parts that are different, and this then gets specified before the standard one so that these different parts will override the standard ones. * Attempted to fix BorderSelect on NLA Channels list. Still not totally working correctly yet though. * Moved "Euler Discontinuity" menu entry from "Channels" to "Keys". It really belongs in the latter, since it affects the keyframe values, rather than some aspect of the channel (i.e. ordering of channels or how they're displayed) --- source/blender/editors/space_nla/space_nla.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_nla/space_nla.c') diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 25c53687597..3bff1d4159f 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -209,9 +209,13 @@ static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar) UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy); /* own keymap */ - // TODO: cannot use generic copy, need special NLA version + /* own channels map first to override some channel keymaps */ keymap= WM_keymap_find(wm->defaultconf, "NLA Channels", SPACE_NLA, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); + /* now generic channels map for everything else that can apply */ + keymap= WM_keymap_find(wm->defaultconf, "Animation Channels", 0, 0); + WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); + keymap= WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -- cgit v1.2.3