Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-12-20 11:24:24 +0300
committerJoshua Leung <aligorith@gmail.com>2008-12-20 11:24:24 +0300
commit6343d4e233e96acee76d68adc060498313bb8d6c (patch)
tree0bf1d55bacfae59f87dc0818e4ed14700841e6a5 /source/blender/editors/space_time
parent3b15fd4707f99bc9a61a5c95f42f9ce18457b7c4 (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')
-rw-r--r--source/blender/editors/space_time/space_time.c3
-rw-r--r--source/blender/editors/space_time/time_ops.c10
2 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index e89a64faf94..5cadd521b66 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -85,7 +85,8 @@ static void time_draw_cfra_time(const bContext *C, SpaceTime *stime, ARegion *ar
static void time_draw_sfra_efra(const bContext *C, SpaceTime *stime, ARegion *ar)
{
- View2D *v2d= UI_view2d_fromcontext(C);
+ View2D *v2d= UI_view2d_fromcontext(C);
+ //Scene *scene= CTX_data_scene(C);
/* draw darkened area outside of active timeline
* frame range used is preview range or scene range */
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;
}