37#include "RNA_prototypes.hh"
71 scd->
dumpsx = dumprect_size[0];
72 scd->
dumpsy = dumprect_size[1];
103 const bool use_crop =
STREQ(op->
idname,
"SCREEN_OT_screenshot_area");
107 if (scd ==
nullptr) {
155 const bool use_crop =
STREQ(op->
idname,
"SCREEN_OT_screenshot_area");
161 if (area_test !=
nullptr) {
174 if (blendfile_path[0] !=
'\0') {
175 STRNCPY(filepath, blendfile_path);
208 return !
STREQ(prop_id,
"filepath");
262 ot->name =
"Save Screenshot";
263 ot->idname =
"SCREEN_OT_screenshot";
264 ot->description =
"Capture a picture of the whole Blender window";
274 ot->name =
"Save Screenshot (Editor)";
275 ot->idname =
"SCREEN_OT_screenshot_area";
276 ot->description =
"Capture a picture of an editor";
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)
char * STRNCPY(char(&dst)[N], const char *src)
#define STRNCPY_UTF8(dst, src)
@ R_IMF_IMTYPE_MULTILAYER
void IMB_color_to_bw(ImBuf *ibuf)
void IMB_rect_crop(ImBuf *ibuf, const rcti *crop)
void IMB_freeImBuf(ImBuf *ibuf)
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_assign_byte_buffer(ImBuf *ibuf, uint8_t *buffer_data, ImBufOwnership ownership)
@ IB_DO_NOT_TAKE_OWNERSHIP
Read Guarded memory(de)allocation.
void uiTemplateImageSettings(uiLayout *layout, bContext *C, PointerRNA *imfptr, bool color_management, const char *panel_idname=nullptr)
@ 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)
@ OPTYPE_DEPENDS_ON_CURSOR
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
PointerRNA RNA_pointer_create_discrete(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 void screenshot_draw(bContext *C, wmOperator *op)
static int screenshot_data_create(bContext *C, wmOperator *op, ScrArea *area)
static bool screenshot_draw_check_prop(PointerRNA *, PropertyRNA *prop, void *)
static wmOperatorStatus screenshot_exec(bContext *C, wmOperator *op)
static wmOperatorStatus screenshot_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void screen_screenshot_impl(wmOperatorType *ot)
static void screenshot_cancel(bContext *, wmOperator *op)
void SCREEN_OT_screenshot_area(wmOperatorType *ot)
static void screenshot_data_free(wmOperator *op)
ImBufByteBuffer byte_buffer
ImageFormatData im_format
void use_property_decorate_set(bool is_sep)
void use_property_split_set(bool value)
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)