remove remaining event recording code
authorJoseph Eagar <joeedh@gmail.com>
Wed, 11 May 2011 20:39:27 +0000 (20:39 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Wed, 11 May 2011 20:39:27 +0000 (20:39 +0000)
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/intern/context.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/creator/creator.c

index c18bdbac107309929954d6b8b210e1e7dfb0f06d..7254536b5557c74ca848d0f12dadcfbbdac99a54 100644 (file)
@@ -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);
 
 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
 #ifdef __cplusplus
 }
 #endif
index 5d4092f0d720482b22f59f66b2078409e099fffa..d4f001242f3221eaf684f9edd62dabf3b070dd6e 100644 (file)
 #include "BKE_main.h"
 #include "BKE_screen.h"
 
 #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"
 #ifndef DISABLE_PYTHON
 #ifdef WITH_PYTHON
 #include "BPY_extern.h"
@@ -94,12 +90,6 @@ struct bContext {
        struct {
                int render;
        } eval;
        struct {
                int render;
        } eval;
-       
-#ifdef EVENT_RECORDER
-       int evtrec, evtplay;
-       char evtplaypath[300];
-       double evtlasttime;
-#endif
 };
 
 /* context */
 };
 
 /* context */
@@ -120,62 +110,6 @@ bContext *CTX_copy(const bContext *C)
        return newC;
 }
 
        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);
 void CTX_free(bContext *C)
 {
        MEM_freeN(C);
index be2a7e876b42b66828d2667017cbfe14e901ed46..717e46800b1f1c9b67d800cef0e5f57a7a14206c 100644 (file)
@@ -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);
 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);
 
 /* space_view3d.c */
 ARegion *view3d_has_buttons_region(ScrArea *sa);
index 288072e8e0823b32040c766b97ab8b4a3dc5b996..4942030c51638bcee0809c536f99b6fd173c387c 100644 (file)
@@ -59,9 +59,6 @@
 
 void view3d_operatortypes(void)
 {
 
 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);
        WM_operatortype_append(VIEW3D_OT_rotate);
        WM_operatortype_append(VIEW3D_OT_move);
        WM_operatortype_append(VIEW3D_OT_zoom);
index c049f1f9821771bf5684d80d18a39ebced004b47..80390f73afa6c23732d23f68ae4732a19ba58bbe 100644 (file)
@@ -278,26 +278,3 @@ void VIEW3D_OT_toolshelf(wmOperatorType *ot)
        ot->flag= 0;
 }
 
        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
index 0928ee0b57d7636203c407cb67e188c36009ad8b..7d8ba4929b16c34f75df174eadaec48ba07c2740 100644 (file)
@@ -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");
        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");
        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;
 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);
        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
 }
 
 #ifdef WITH_PYTHON_MODULE
@@ -1359,11 +1337,7 @@ int main(int argc, const char **argv)
                        if(WM_init_game(C))
                                return 0;
                }
                        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);
        }
 
                        WM_init_splash(C);
        }