diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-12-20 11:24:24 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-12-20 11:24:24 +0300 |
commit | 6343d4e233e96acee76d68adc060498313bb8d6c (patch) | |
tree | 0bf1d55bacfae59f87dc0818e4ed14700841e6a5 /source/blender/editors/space_action/space_action.c | |
parent | 3b15fd4707f99bc9a61a5c95f42f9ce18457b7c4 (diff) |
2.5 - Start of porting of Animation Editors
* Added new 'Animation' submodule under Editors. This will be used to house all code + features that are used by many different Animation Editors (Action/Dopesheet and IPO) as well as other parts of Blender.
* Added back some of the core code need by the Action/Dopesheet editor, which will also be used by IPO Editor.
* Brought back file for keyframing management code (i.e. keyframing.c), but there's still quite a lot of missing stuff that I'll need to restore, so in the meantime, it's #if 0'd out.
* Moved markers code to this new module (I'm not sure whether SVN will recognise this change, as TortoiseSVN doesn't seem to have any obvious copy/move commands)
Diffstat (limited to 'source/blender/editors/space_action/space_action.c')
-rw-r--r-- | source/blender/editors/space_action/space_action.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 0ebcd88ffb2..12666bbd41b 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -57,6 +57,7 @@ #include "UI_resources.h" #include "UI_view2d.h" +#include "ED_anim_api.h" #include "ED_markers.h" #include "action_intern.h" // own include @@ -167,7 +168,7 @@ static void action_main_area_draw(const bContext *C, ARegion *ar) View2DGrid *grid; View2DScrollers *scrollers; float col[3]; - int unit; + short unit=0, flag=0; /* clear and setup matrix */ UI_GetThemeColor3fv(TH_BACK, col); @@ -184,6 +185,13 @@ static void action_main_area_draw(const bContext *C, ARegion *ar) /* data? */ + /* current frame */ + if (saction->flag & SACTION_DRAWTIME) flag |= DRAWCFRA_UNIT_SECONDS; + if ((saction->flag & SACTION_NODRAWCFRANUM)==0) flag |= DRAWCFRA_SHOW_NUMBOX; + ANIM_draw_cfra(C, v2d, flag); + + /* preview range */ + ANIM_draw_previewrange(C, v2d); /* reset view matrix */ UI_view2d_view_restore(C); @@ -298,7 +306,7 @@ void ED_spacetype_action(void) art->init= action_main_area_init; art->draw= action_main_area_draw; art->listener= action_main_area_listener; - art->keymapflag= ED_KEYMAP_VIEW2D; + art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_MARKERS; BLI_addhead(&st->regiontypes, art); |