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_time/time_ops.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_time/time_ops.c')
-rw-r--r-- | source/blender/editors/space_time/time_ops.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c index 30b0e808e05..e8704457c00 100644 --- a/source/blender/editors/space_time/time_ops.c +++ b/source/blender/editors/space_time/time_ops.c @@ -181,16 +181,18 @@ void ED_TIME_OT_change_frame(wmOperatorType *ot) static int toggle_time_exec(bContext *C, wmOperator *op) { - SpaceTime *stime; + SpaceTime *stime= (SpaceTime *)CTX_wm_space_data(C); + ScrArea *curarea= CTX_wm_area(C); - if (ELEM(NULL, CTX_wm_area(C), CTX_wm_space_data(C))) + if (ELEM(NULL, curarea, stime)) return OPERATOR_CANCELLED; /* simply toggle draw frames flag for now */ - // XXX in past, this displayed menu to choose... (for later!) - stime= (SpaceTime*)CTX_wm_space_data(C); + // in past, this asked user to choose in a menu beforehand, but that is clumsy stime->flag ^= TIME_DRAWFRAMES; + ED_area_tag_redraw(curarea); + return OPERATOR_FINISHED; } |