34 #include "RNA_prototypes.h"
68 scd->
dumpsx = dumprect_size[0];
69 scd->
dumpsy = dumprect_size[1];
100 const bool use_crop =
STREQ(op->
idname,
"SCREEN_OT_screenshot_area");
150 const bool use_crop =
STREQ(op->
idname,
"SCREEN_OT_screenshot_area");
156 if (area_test !=
NULL) {
167 char filepath[
FILE_MAX] =
"//screen";
169 if (blendfile_path[0] !=
'\0') {
170 BLI_strncpy(filepath, blendfile_path,
sizeof(filepath));
199 return !(
STREQ(prop_id,
"filepath"));
249 ot->
name =
"Save Screenshot";
250 ot->
idname =
"SCREEN_OT_screenshot";
251 ot->
description =
"Capture a picture of the whole Blender window";
261 ot->
name =
"Save Screenshot (Editor)";
262 ot->
idname =
"SCREEN_OT_screenshot_area";
struct ScrArea * CTX_wm_area(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, const struct ImageFormatData *imf)
const char * BKE_main_blendfile_path_from_global(void)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
struct ScrArea struct ScrArea * BKE_screen_find_area_xy(struct bScreen *screen, int spacetype, const int xy[2]) ATTR_NONNULL(1
bool BLI_path_extension_replace(char *path, size_t maxlen, const char *ext) ATTR_NONNULL()
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
void IMB_color_to_bw(struct ImBuf *ibuf)
struct ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_rect_crop(struct ImBuf *ibuf, const struct rcti *crop)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr, bool color_management)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
@ UI_BUT_LABEL_ALIGN_NONE
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, bool(*check_prop)(struct PointerRNA *ptr, struct PropertyRNA *prop, void *user_data), void *user_data, struct PropertyRNA *prop_activate_init, eButLabelAlign label_align, bool compact)
@ OPTYPE_DEPENDS_ON_CURSOR
void IMB_freeImBuf(ImBuf *UNUSED(ibuf))
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
const char * RNA_property_identifier(const PropertyRNA *prop)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
struct ScreenshotData ScreenshotData
static bool screenshot_poll(bContext *C)
void SCREEN_OT_screenshot(wmOperatorType *ot)
static int screenshot_data_create(bContext *C, wmOperator *op, ScrArea *area)
static void screenshot_cancel(bContext *UNUSED(C), wmOperator *op)
static void screen_screenshot_impl(wmOperatorType *ot)
static void screenshot_draw(bContext *UNUSED(C), wmOperator *op)
void SCREEN_OT_screenshot_area(wmOperatorType *ot)
static int screenshot_exec(bContext *C, wmOperator *op)
static void screenshot_data_free(wmOperator *op)
static int screenshot_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool screenshot_draw_check_prop(PointerRNA *UNUSED(ptr), PropertyRNA *prop, void *UNUSED(user_data))
static bool screenshot_check(bContext *UNUSED(C), wmOperator *op)
ImageFormatData im_format
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
void(* ui)(struct bContext *, struct wmOperator *)
bool(* check)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_redraw_windows(bContext *C)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFormatData *im_format)
bool WM_operator_winactive(bContext *C)
uint * WM_window_pixels_read(wmWindowManager *wm, wmWindow *win, int r_size[2])