Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/workspace/screendump.c
- This file was moved from source/blender/editors/screen/screendump.c.
| Show All 18 Lines | |||||
| * All rights reserved. | * All rights reserved. | ||||
| * | * | ||||
| * Contributor(s): Blender Foundation | * Contributor(s): Blender Foundation | ||||
| * | * | ||||
| * ***** END GPL LICENSE BLOCK ***** | * ***** END GPL LICENSE BLOCK ***** | ||||
| * Making screendumps. | * Making screendumps. | ||||
| */ | */ | ||||
| /** \file blender/editors/screen/screendump.c | /** \file blender/editors/workspace/screendump.c | ||||
| * \ingroup edscr | * \ingroup edworkspace | ||||
| */ | */ | ||||
| #include <string.h> | #include <string.h> | ||||
| #include <errno.h> | #include <errno.h> | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| ▲ Show 20 Lines • Show All 492 Lines • ▼ Show 20 Lines | static int screencast_exec(bContext *C, wmOperator *op) | ||||
| sj->bmain = CTX_data_main(C); | sj->bmain = CTX_data_main(C); | ||||
| sj->scene = CTX_data_scene(C); | sj->scene = CTX_data_scene(C); | ||||
| sj->wm = wm; | sj->wm = wm; | ||||
| BKE_reports_init(&sj->reports, RPT_PRINT); | BKE_reports_init(&sj->reports, RPT_PRINT); | ||||
| /* setup job */ | /* setup job */ | ||||
| WM_jobs_customdata_set(wm_job, sj, screenshot_freejob); | WM_jobs_customdata_set(wm_job, sj, screenshot_freejob); | ||||
| WM_jobs_timer(wm_job, 0.1, 0, NC_SCREEN | ND_SCREENCAST); | WM_jobs_timer(wm_job, 0.1, 0, NC_WORKSPACE | ND_SCREENCAST); | ||||
| WM_jobs_callbacks(wm_job, screenshot_startjob, NULL, screenshot_updatejob, screenshot_endjob); | WM_jobs_callbacks(wm_job, screenshot_startjob, NULL, screenshot_updatejob, screenshot_endjob); | ||||
| WM_jobs_start(sj->wm, wm_job); | WM_jobs_start(sj->wm, wm_job); | ||||
| screencast_cursor_toggle(sj->wm, 1); | screencast_cursor_toggle(sj->wm, 1); | ||||
| WM_event_add_notifier(C, NC_SCREEN | ND_SCREENCAST, screen); | WM_event_add_notifier(C, NC_WORKSPACE | ND_SCREENCAST, screen); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void SCREEN_OT_screencast(wmOperatorType *ot) | void SCREEN_OT_screencast(wmOperatorType *ot) | ||||
| { | { | ||||
| ot->name = "Make Screencast"; | ot->name = "Make Screencast"; | ||||
| ot->idname = "SCREEN_OT_screencast"; | ot->idname = "SCREEN_OT_screencast"; | ||||
| Show All 12 Lines | |||||