diff options
author | Joseph Eagar <joeedh@gmail.com> | 2011-05-12 00:39:27 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2011-05-12 00:39:27 +0400 |
commit | b72f087e7eec3949790df362d05c08476680de4a (patch) | |
tree | a9fa4303217093743d7a65a4ee9452076d2a809d | |
parent | b2d752d020eff85963383c2c2e49779e99cd60fc (diff) |
remove remaining event recording code
-rw-r--r-- | source/blender/blenkernel/BKE_context.h | 18 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 66 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_intern.h | 3 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_ops.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_toolbar.c | 23 | ||||
-rw-r--r-- | source/creator/creator.c | 28 |
6 files changed, 1 insertions, 140 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index c18bdbac107..7254536b555 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -267,24 +267,6 @@ struct bPoseChannel *CTX_data_active_pose_bone(const bContext *C); int CTX_data_selected_pose_bones(const bContext *C, ListBase *list); int CTX_data_visible_pose_bones(const bContext *C, ListBase *list); -//stupid compiler flag isn't working -//remember to undef this later -#ifndef EVENT_RECORDER -#define EVENT_RECORDER -#endif - -#ifdef EVENT_RECORDER -#include <stdio.h> - -int CTX_rec_events(bContext *C); -FILE *CTX_rec_file(bContext *C); -int CTX_set_events_path(bContext *C, const char *path); -int CTX_play_events(bContext *C, char **playpath); -int CTX_rec_events_set(bContext *C, int state); -double CTX_rec_lasttime(bContext *C, double newtime); - -#endif - #ifdef __cplusplus } #endif diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 5d4092f0d72..d4f001242f3 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -53,10 +53,6 @@ #include "BKE_main.h" #include "BKE_screen.h" -#ifdef EVENT_RECORDER -#include "../../../../intern/ghost/GHOST_C-api.h" -#endif - #ifndef DISABLE_PYTHON #ifdef WITH_PYTHON #include "BPY_extern.h" @@ -94,12 +90,6 @@ struct bContext { struct { int render; } eval; - -#ifdef EVENT_RECORDER - int evtrec, evtplay; - char evtplaypath[300]; - double evtlasttime; -#endif }; /* context */ @@ -120,62 +110,6 @@ bContext *CTX_copy(const bContext *C) return newC; } -#if defined(EVENT_RECORDER) && !defined(BUILDING_GAMEPLAYER) -extern GHOST_SystemHandle g_system; - -int CTX_rec_events(bContext *UNUSED(C)) -{ - return GHOST_RecordingEvents(g_system); -} - -int CTX_rec_events_set(bContext *C, int state) -{ - FILE *f = CTX_rec_file(C); - - if (GHOST_RecordingEvents(g_system) && !state) - GHOST_StopRecording(g_system); - else if (!GHOST_RecordingEvents(g_system) && state) - GHOST_RecordEvents(g_system, f); - - return 1; -} - -FILE *CTX_rec_file(bContext *UNUSED(C)) -{ - static FILE *f = NULL; - if (!f) - f = fopen("eventlog.txt", "wb"); - return f; -} - -int CTX_set_events_path(bContext *C, const char *path) -{ - if (!path) { - C->evtplaypath[0] = 0; - } else { - FILE *file = fopen(path, "rb"); - - if (!file) - return 0; - - strcpy(C->evtplaypath, path); - if (g_system) - GHOST_PlaybackEvents(g_system, file); - } - - return 1; -} - -extern int erec_playing; -int CTX_play_events(bContext *C, char **playpath) -{ - if (playpath) - *playpath = C->evtplaypath[0] ? C->evtplaypath : NULL; - - return GHOST_PlayingEvents(g_system); -} -#endif - void CTX_free(bContext *C) { MEM_freeN(C); diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index be2a7e876b4..717e46800b1 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -186,9 +186,6 @@ void VIEW3D_OT_snap_cursor_to_grid(struct wmOperatorType *ot); void VIEW3D_OT_snap_cursor_to_center(struct wmOperatorType *ot); void VIEW3D_OT_snap_cursor_to_selected(struct wmOperatorType *ot); void VIEW3D_OT_snap_cursor_to_active(struct wmOperatorType *ot); -#ifdef EVENT_RECORDER -void VIEW3D_OT_evtrec(struct wmOperatorType *ot); -#endif /* space_view3d.c */ ARegion *view3d_has_buttons_region(ScrArea *sa); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 288072e8e08..4942030c516 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -59,9 +59,6 @@ void view3d_operatortypes(void) { -#ifdef EVENT_RECORDER - WM_operatortype_append(VIEW3D_OT_evtrec); -#endif WM_operatortype_append(VIEW3D_OT_rotate); WM_operatortype_append(VIEW3D_OT_move); WM_operatortype_append(VIEW3D_OT_zoom); diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index c049f1f9821..80390f73afa 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -278,26 +278,3 @@ void VIEW3D_OT_toolshelf(wmOperatorType *ot) ot->flag= 0; } - -#ifdef EVENT_RECORDER -static int view3d_evtrec(bContext *C, wmOperator *UNUSED(op)) -{ - - CTX_rec_events_set(C, !CTX_rec_events(C)); - - return OPERATOR_FINISHED; -} - -void VIEW3D_OT_evtrec(wmOperatorType *ot) -{ - ot->name= "Toggle Event Recorder"; - ot->description= "Toggles event recorder"; - ot->idname= "VIEW3D_OT_evtrec"; - - ot->exec= view3d_evtrec; - ot->poll= ED_operator_view3d_active; - - /* flags */ - ot->flag= 0; -} -#endif diff --git a/source/creator/creator.c b/source/creator/creator.c index 0928ee0b57d..7d8ba4929b1 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -260,9 +260,6 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) printf ("Misc Options:\n"); BLI_argsPrintArgDoc(ba, "--debug"); BLI_argsPrintArgDoc(ba, "--debug-fpe"); -#ifdef EVENT_RECORDER - BLI_argsPrintArgDoc(ba, "--eventmacro"); -#endif printf("\n"); BLI_argsPrintArgDoc(ba, "--factory-startup"); printf("\n"); @@ -874,20 +871,6 @@ static int set_start_frame(int argc, const char **argv, void *data) } } -#ifdef EVENT_RECORDER -static int set_macro_playback(int argc, const char **argv, void *data) -{ - bContext *C = data; - - if (argc < 2) - return 0; - - CTX_set_events_path(C, argv[1]); - - return 0; -} -#endif - static int set_end_frame(int argc, const char **argv, void *data) { bContext *C = data; @@ -1184,11 +1167,6 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) BLI_argsAdd(ba, 4, "-F", "--render-format", format_doc, set_image_type, C); BLI_argsAdd(ba, 4, "-t", "--threads", "<threads>\n\tUse amount of <threads> for rendering in background\n\t[1-" STRINGIFY(BLENDER_MAX_THREADS) "], 0 for systems processor count.", set_threads, NULL); BLI_argsAdd(ba, 4, "-x", "--use-extension", "<bool>\n\tSet option to add the file extension to the end of the file", set_extension, C); - -#ifdef EVENT_RECORDER - BLI_argsAdd(ba, 4, "--eventmacro", NULL, "<file>\n\tevent macro", set_macro_playback, C); -#endif - } #ifdef WITH_PYTHON_MODULE @@ -1359,11 +1337,7 @@ int main(int argc, const char **argv) if(WM_init_game(C)) return 0; } -#ifdef EVENT_RECORDER - else if(!G.file_loaded && !CTX_play_events(C, NULL)) -#else - else if(!G.file_loaded) -#endif + else if(!G.file_loaded) WM_init_splash(C); } |