Blender V2.61 - r43446
|
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_image.h"
#include "BKE_report.h"
#include "BKE_writeavi.h"
#include "BIF_gl.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_types.h"
#include "WM_api.h"
#include "PIL_time.h"
#include "ED_screen_types.h"
#include "screen_intern.h"
Go to the source code of this file.
Classes | |
struct | ScreenshotData |
struct | ScreenshotJob |
Typedefs | |
typedef struct ScreenshotData | ScreenshotData |
typedef struct ScreenshotJob | ScreenshotJob |
Functions | |
static unsigned int * | screenshot (bContext *C, int *dumpsx, int *dumpsy) |
static int | screenshot_data_create (bContext *C, wmOperator *op) |
static void | screenshot_data_free (wmOperator *op) |
static void | screenshot_crop (ImBuf *ibuf, rcti crop) |
static int | screenshot_exec (bContext *C, wmOperator *op) |
static int | screenshot_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event)) |
static int | screenshot_cancel (bContext *UNUSED(C), wmOperator *op) |
void | SCREEN_OT_screenshot (wmOperatorType *ot) |
static void | screenshot_freejob (void *sjv) |
static void | screenshot_updatejob (void *sjv) |
static void | screenshot_startjob (void *sjv, short *stop, short *do_update, float *UNUSED(progress)) |
static int | screencast_exec (bContext *C, wmOperator *op) |
void | SCREEN_OT_screencast (wmOperatorType *ot) |
Definition in file screendump.c.
typedef struct ScreenshotData ScreenshotData |
typedef struct ScreenshotJob ScreenshotJob |
void SCREEN_OT_screencast | ( | wmOperatorType * | ot | ) |
Definition at line 393 of file screendump.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, PROP_FILEPATH, PROP_STRING, RNA_def_boolean(), RNA_def_property(), screencast_exec(), wmOperatorType::srna, WM_operator_confirm(), and WM_operator_winactive().
Referenced by ED_operatortypes_screen().
void SCREEN_OT_screenshot | ( | wmOperatorType * | ot | ) |
Definition at line 219 of file screendump.c.
References wmOperatorType::cancel, wmOperatorType::exec, FILE_SAVE, FILE_SPECIAL, wmOperatorType::flag, FOLDERFILE, wmOperatorType::idname, IMAGEFILE, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, RNA_def_boolean(), screenshot_cancel(), screenshot_exec(), screenshot_invoke(), wmOperatorType::srna, WM_FILESEL_FILEPATH, WM_operator_properties_filesel(), and WM_operator_winactive().
Referenced by ED_operatortypes_screen().
static int screencast_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 355 of file screendump.c.
References BKE_reports_init(), ScreenshotJob::bmain, CTX_data_main(), CTX_data_scene(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_screen(), CTX_wm_window(), ScreenshotJob::dumpsx, ScreenshotJob::dumpsy, MEM_callocN(), NC_SCREEN, ND_SCREENCAST, NULL, OPERATOR_FINISHED, wmOperator::ptr, ScreenshotJob::reports, RNA_boolean_get(), RPT_PRINT, ScreenshotJob::scene, screenshot_freejob(), screenshot_startjob(), screenshot_updatejob(), wmWindow::sizex, wmWindow::sizey, ScrArea::totrct, WM_event_add_notifier(), WM_jobs_callbacks(), WM_jobs_customdata(), WM_jobs_get(), WM_jobs_start(), WM_jobs_timer(), ScreenshotJob::x, rcti::xmax, rcti::xmin, ScreenshotJob::y, rcti::ymax, and rcti::ymin.
Referenced by SCREEN_OT_screencast().
static unsigned int* screenshot | ( | bContext * | C, |
int * | dumpsx, | ||
int * | dumpsy | ||
) | [static] |
Definition at line 75 of file screendump.c.
References CTX_wm_window(), MEM_mallocN(), NULL, wmWindow::sizex, and wmWindow::sizey.
Referenced by screenshot_data_create().
static int screenshot_cancel | ( | bContext * | UNUSEDC, |
wmOperator * | op | ||
) | [static] |
Definition at line 213 of file screendump.c.
References OPERATOR_CANCELLED, and screenshot_data_free().
Referenced by SCREEN_OT_screenshot().
Definition at line 140 of file screendump.c.
References ImBuf::rect, ImBuf::x, rcti::xmax, rcti::xmin, ImBuf::y, rcti::ymax, and rcti::ymin.
Referenced by screenshot_exec().
static int screenshot_data_create | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 99 of file screendump.c.
References ScreenshotData::crop, CTX_wm_area(), wmOperator::customdata, ScreenshotData::dumprect, ScreenshotData::dumpsx, ScreenshotData::dumpsy, FALSE, MEM_callocN(), NULL, screenshot(), ScrArea::totrct, TRUE, and WM_redraw_windows().
Referenced by screenshot_exec(), and screenshot_invoke().
static void screenshot_data_free | ( | wmOperator * | op | ) | [static] |
Definition at line 128 of file screendump.c.
References wmOperator::customdata, ScreenshotData::dumprect, MEM_freeN(), and NULL.
Referenced by screenshot_cancel(), and screenshot_exec().
static int screenshot_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 155 of file screendump.c.
References BKE_add_image_extension(), BKE_write_ibuf(), BLI_path_abs(), BLI_strncpy(), ScreenshotData::crop, CTX_data_scene(), wmOperator::customdata, ScreenshotData::dumprect, ScreenshotData::dumpsx, ScreenshotData::dumpsy, FILE_MAX, G, RenderData::im_format, IMB_allocImBuf(), IMB_freeImBuf(), ImageFormatData::imtype, NULL, OPERATOR_FINISHED, wmOperator::ptr, Scene::r, R_EXTENSION, ImBuf::rect, RNA_boolean_get(), RNA_string_get(), RenderData::scemode, screenshot_crop(), screenshot_data_create(), screenshot_data_free(), and strlen().
Referenced by SCREEN_OT_screenshot(), and screenshot_invoke().
static void screenshot_freejob | ( | void * | sjv | ) | [static] |
Definition at line 248 of file screendump.c.
References ScreenshotJob::dumprect, and MEM_freeN().
Referenced by screencast_exec().
static int screenshot_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 198 of file screendump.c.
References G, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), screenshot_data_create(), screenshot_exec(), and WM_event_add_fileselect().
Referenced by SCREEN_OT_screenshot().
static void screenshot_startjob | ( | void * | sjv, |
short * | stop, | ||
short * | do_update, | ||
float * | UNUSEDprogress | ||
) | [static] |
Definition at line 276 of file screendump.c.
References bMovieHandle::append_movie, BKE_get_movie_handle(), BKE_imtype_is_movie(), BKE_makepicstring(), BKE_report(), BKE_reportf(), BKE_write_ibuf(), ScreenshotJob::bmain, RenderData::cfra, ScreenshotJob::do_update, ScreenshotJob::dumprect, ScreenshotJob::dumpsx, ScreenshotJob::dumpsy, bMovieHandle::end_movie, FILE_MAX, RenderData::frs_sec, RenderData::frs_sec_base, RenderData::im_format, IMB_allocImBuf(), IMB_freeImBuf(), ImageFormatData::imtype, MEM_freeN(), Main::name, NULL, RenderData::pic, PIL_sleep_ms(), ImageFormatData::planes, Scene::r, R_EXTENSION, ImBuf::rect, ScreenshotJob::reports, RPT_INFO, RenderData::scemode, ScreenshotJob::scene, UserDef::scrcastfps, UserDef::scrcastwait, RenderData::sfra, bMovieHandle::start_movie, ScreenshotJob::stop, TRUE, and U.
Referenced by screencast_exec().
static void screenshot_updatejob | ( | void * | sjv | ) | [static] |
Definition at line 260 of file screendump.c.
References ScreenshotJob::dumprect, ScreenshotJob::dumpsx, ScreenshotJob::dumpsy, MEM_mallocN(), NULL, ScreenshotJob::x, and ScreenshotJob::y.
Referenced by screencast_exec().