36#include "RNA_prototypes.hh"
70 scd->
dumpsx = dumprect_size[0];
71 scd->
dumpsy = dumprect_size[1];
74 scd->
crop = area->totrct;
102 const bool use_crop =
STREQ(op->
idname,
"SCREEN_OT_screenshot_area");
106 if (scd ==
nullptr) {
154 const bool use_crop =
STREQ(op->
idname,
"SCREEN_OT_screenshot_area");
160 if (area_test !=
nullptr) {
173 if (blendfile_path[0] !=
'\0') {
174 STRNCPY(filepath, blendfile_path);
207 return !
STREQ(prop_id,
"filepath");
261 ot->
name =
"Save Screenshot";
262 ot->
idname =
"SCREEN_OT_screenshot";
263 ot->
description =
"Capture a picture of the whole Blender window";
273 ot->
name =
"Save Screenshot (Editor)";
274 ot->
idname =
"SCREEN_OT_screenshot_area";
bScreen * CTX_wm_screen(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
bool BKE_imbuf_write(ImBuf *ibuf, const char *filepath, const ImageFormatData *imf)
const char * BKE_main_blendfile_path_from_global()
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
ScrArea ScrArea * BKE_screen_find_area_xy(const bScreen *screen, int spacetype, const int xy[2]) ATTR_NONNULL(1
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
bool bool BLI_path_extension_strip(char *path) ATTR_NONNULL(1)
#define STRNCPY(dst, src)
@ R_IMF_IMTYPE_MULTILAYER
void IMB_color_to_bw(ImBuf *ibuf)
void IMB_rect_crop(ImBuf *ibuf, const rcti *crop)
void IMB_assign_byte_buffer(ImBuf *ibuf, uint8_t *buffer_data, ImBufOwnership ownership)
Contains defines and structs used throughout the imbuf module.
@ IB_DO_NOT_TAKE_OWNERSHIP
Read Guarded memory(de)allocation.
void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_management)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
@ UI_BUT_LABEL_ALIGN_NONE
eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, bool(*check_prop)(PointerRNA *ptr, PropertyRNA *prop, void *user_data), void *user_data, PropertyRNA *prop_activate_init, eButLabelAlign label_align, bool compact)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
@ OPTYPE_DEPENDS_ON_CURSOR
struct ImBuf * IMB_allocImBuf(unsigned int, unsigned int, unsigned char, unsigned int)
void IMB_freeImBuf(ImBuf *)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
const char * RNA_property_identifier(const PropertyRNA *prop)
static bool screenshot_poll(bContext *C)
static bool screenshot_check(bContext *, wmOperator *op)
void SCREEN_OT_screenshot(wmOperatorType *ot)
static int screenshot_data_create(bContext *C, wmOperator *op, ScrArea *area)
static bool screenshot_draw_check_prop(PointerRNA *, PropertyRNA *prop, void *)
static void screen_screenshot_impl(wmOperatorType *ot)
static void screenshot_cancel(bContext *, 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 void screenshot_draw(bContext *, wmOperator *op)
ImBufByteBuffer byte_buffer
ImageFormatData im_format
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
bool(* check)(bContext *C, wmOperator *op)
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* ui)(bContext *C, wmOperator *op)
void(* cancel)(bContext *C, wmOperator *op)
struct ReportList * reports
uint8_t * WM_window_pixels_read(bContext *C, wmWindow *win, int r_size[2])
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_winactive(bContext *C)
bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const ImageFormatData *im_format)