merge with/from trunk at r35190
[blender.git] / source / blender / editors / space_view3d / view3d_toolbar.c
index bfe324df51e0b9b86edd7d7576a1326c1315c224..3292c5d396c76d85637bd49c5a39ae60fdaf63ff 100644 (file)
@@ -272,3 +272,27 @@ void VIEW3D_OT_toolshelf(wmOperatorType *ot)
        /* flags */
        ot->flag= 0;
 }
+
+
+#ifdef EVENT_RECORDER
+static int view3d_evtrec(bContext *C, wmOperator *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