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
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-04-20 06:39:07 +0400
committerJoshua Leung <aligorith@gmail.com>2010-04-20 06:39:07 +0400
commitb52eddd95a5dd68a98520be0de211e08d991e868 (patch)
tree96ae330ef8c7eca69d5bc93deaa298034bb51373 /source
parent45abe2baf2a730458751bd50f4bf10f9f36b2977 (diff)
Made playback operators use exec() callback instead of invoke(), so that these can be used for Python scripts.
Note that this is not the patch by dfelinto on the mailing list, since that fix would cause compiler warnings. Also, the invoke() (with the extra wmEvent* arg) is superfluous here, so there shouldn't be any problems with making this exec() only instead.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/screen/screen_ops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index db670913eaa..244997775fc 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2561,7 +2561,7 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
return OPERATOR_FINISHED;
}
-static int screen_animation_play_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int screen_animation_play_exec(bContext *C, wmOperator *op)
{
int mode= (RNA_boolean_get(op->ptr, "reverse")) ? -1 : 1;
int sync= -1;
@@ -2580,7 +2580,7 @@ static void SCREEN_OT_animation_play(wmOperatorType *ot)
ot->idname= "SCREEN_OT_animation_play";
/* api callbacks */
- ot->invoke= screen_animation_play_invoke;
+ ot->exec= screen_animation_play_exec;
ot->poll= ED_operator_screenactive;
@@ -2588,7 +2588,7 @@ static void SCREEN_OT_animation_play(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "sync", 0, "Sync", "Drop frames to maintain framerate");
}
-static int screen_animation_cancel(bContext *C, wmOperator *op, wmEvent *event)
+static int screen_animation_cancel_exec(bContext *C, wmOperator *op)
{
bScreen *screen= CTX_wm_screen(C);
@@ -2617,7 +2617,7 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot)
ot->idname= "SCREEN_OT_animation_cancel";
/* api callbacks */
- ot->invoke= screen_animation_cancel;
+ ot->exec= screen_animation_cancel_exec;
ot->poll= ED_operator_screenactive;
}