diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-01-26 14:33:16 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-01-26 14:33:16 +0300 |
commit | a34e2e1427413b6e116c99e81a58d4535e521a2b (patch) | |
tree | e1434d0f2078982369d83a0a11139828eb942e99 /source/blender/editors/animation/anim_draw.c | |
parent | bf05827319f07d7a7b34ff34d0556cb54f6284d9 (diff) |
Animato/2.5 - Graph Editor (i.e. the new 'IPO Editor')
This commit brings back the drawing code for the 'Graph Editor'. I've decided to call it this, as currently it can show either F-Curves for Animation stored in Actions, or F-Curves for Drivers.
Currently, it shows all curves, since some of the necessary filtering code (i.e. for limiting curve visibility) hasn't been put in place yet. At least this serves as good proof that we can have F-Curves from multiple sources at least.
It should be noted that the code still has to be modified to work with some of the new Animato features, such as F-Curve Modifiers (cycles are an example of one of the features that use this). Also, a nicer way to set the colours of the curves needs to be investigated.
Notes:
* Fixed a few bugs in RNA User-Preferences wrapping
* The keyframe drawing uses the new-style drawing for handles from AnimSys2. There's a minor bug that sometimes occurs, where a distorted handle gets drawn at the origin of the grid on the first run. Hints anyone?
* Removed most of the old data from SpaceIpo struct, as the new code uses that. Maybe later, the directories/files at least should get renamed.
* Removed ancient hack for NVidia/TNT drivers. It is probably no longer needed, but could be restored if someone needs it.
Diffstat (limited to 'source/blender/editors/animation/anim_draw.c')
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 843cadd4736..e0962eadfca 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -193,25 +193,15 @@ Object *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale) return NULL; /* handling depends on the type of animation-context we've got */ - if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_IPO)) { - /* Action Editor (action mode) or Ipo Editor (ipo mode): + if (ac->datatype == ANIMCONT_ACTION) { + /* Action Editor (action mode) or Graph Editor (ipo mode): * Only use if editor is not pinned, and active object has action */ if (ac->obact && ac->obact->action) { - /* Action Editor */ - if (ac->datatype == ANIMCONT_ACTION) { - SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first; - - if (saction->pin == 0) - return ac->obact; - } - /* IPO Editor */ - else if (ac->datatype == ANIMCONT_IPO) { - SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; - - if (sipo->pin == 0) - return ac->obact; - } + SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first; + + if (saction->pin == 0) + return ac->obact; } } else if ((ac->datatype == ANIMCONT_DOPESHEET) && (ale)) { @@ -225,6 +215,7 @@ Object *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale) return ob; } } + // XXX todo: add F-Curves mode (Graph Editor) ... /* no appropriate object found */ return NULL; |