diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-07-28 10:50:30 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-07-28 10:50:30 +0400 |
commit | 61178b19eabdc3e3833c167cdc8128db8994f9ca (patch) | |
tree | 3f1e666d11155d74b83fa427d6233f63dd22db24 /source/blender/editors/animation/anim_draw.c | |
parent | 9cbdf73cf0ce53bdf256b1b28efbb066a71e43b9 (diff) |
2.5 - Anim Editor cleanups + Graph Editor Clutter Reduction
* Cleaned up some parts of the code that were unused/could be done a bit nicer
* Added a new option for only showing the keyframes of the selected F-Curves in the Graph Editor, as another way of reducing the clutter.
Diffstat (limited to 'source/blender/editors/animation/anim_draw.c')
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 6c39e670f5c..6388106fdb5 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -242,40 +242,10 @@ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale) return NULL; /* handling depends on the type of animation-context we've got */ - if (ale && ale->id) - return BKE_animdata_from_id(ale->id); - - /* no appropriate object found */ - return NULL; -} - -/* Set/clear temporary mapping of coordinates from 'local-action' time to 'global-nla-scaled' time - * - the old mapping is stored in a static var, but that shouldn't be too bad as UI drawing - * (where this is called) is single-threaded anyway - */ -// XXX was called: map_active_strip() -// TODO: should this be depreceated? -void ANIM_nla_mapping_draw(gla2DDrawInfo *di, AnimData *adt, short restore) -{ - static rctf stored; - - if (restore) { - /* restore un-mapped coordinates */ - gla2DSetMap(di, &stored); - } - else { - /* set mapped coordinates */ - rctf map; - - gla2DGetMap(di, &stored); - map= stored; - - map.xmin= BKE_nla_tweakedit_remap(adt, map.xmin, NLATIME_CONVERT_MAP); - map.xmax= BKE_nla_tweakedit_remap(adt, map.xmax, NLATIME_CONVERT_MAP); - - if (map.xmin == map.xmax) map.xmax += 1.0f; - gla2DSetMap(di, &map); - } + if (ale) + return ale->adt; + else + return NULL; } /* ------------------- */ |