49 int size, maxsize = 0, bwmaxsize = 0;
53 if (area->winx > 30 && area->winy > 30) {
54 size = area->winx * area->winy;
56 if (foundwin == 0 &&
size > bwmaxsize) {
135 bool area_was_image =
false;
149 sizex = std::max(sizex, 320);
150 sizey = std::max(sizey, 256);
153 rctf *stored_bounds = &
U.stored_bounds.image;
154 const bool bounds_valid = (stored_bounds && (
BLI_rctf_size_x(stored_bounds) > 150.0f) &&
157 if (bounds_valid && mm_placement) {
162 const rcti window_rect = {
196 if (area && area->
full) {
201 area_was_image =
true;
212 if (area ==
nullptr) {
222 if (area ==
nullptr) {
263 if (area_was_image == 0) {
327 ot->name =
"Cancel Render View";
328 ot->description =
"Cancel show render view";
329 ot->idname =
"RENDER_OT_view_cancel";
360 (win == win_show && win_show != wincur))
370 if (
G.is_rendering ==
false) {
397 ot->name =
"Show/Hide Render View";
398 ot->description =
"Toggle show render view";
399 ot->idname =
"RENDER_OT_view_show";
bScreen * CTX_wm_screen(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
Image * BKE_image_ensure_viewer(Main *bmain, int type, const char *name)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
ScrArea * BKE_screen_find_big_area(const bScreen *screen, int spacetype, short min)
#define LISTBASE_FOREACH(type, var, list)
void void BLI_INLINE bool BLI_listbase_is_single(const ListBase *lb)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
@ AREA_FLAG_STACKED_FULLSCREEN
@ SPACE_FLAG_TYPE_WAS_ACTIVE
@ SPACE_FLAG_TYPE_TEMPORARY
@ USER_RENDER_DISPLAY_NONE
@ USER_RENDER_DISPLAY_SCREEN
@ USER_RENDER_DISPLAY_WINDOW
void ED_area_newspace(bContext *C, ScrArea *area, int type, bool skip_region_exit)
bool ED_operator_screenactive(bContext *C)
ScrArea * ED_screen_full_newspace(bContext *C, ScrArea *area, int type)
bool ED_operator_image_active(bContext *C)
ScrArea * ED_screen_state_toggle(bContext *C, wmWindow *win, ScrArea *area, short state)
void ED_area_prevspace(bContext *C, ScrArea *area)
void ED_screen_full_prevspace(bContext *C, ScrArea *area)
@ WM_CAPABILITY_MULTIMONITOR_PLACEMENT
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void RENDER_OT_view_show(wmOperatorType *ot)
static ScrArea * find_area_showing_render_result(bContext *C, Scene *scene, wmWindow **r_win)
ScrArea * render_view_open(bContext *C, int mx, int my, ReportList *reports)
static wmOperatorStatus render_view_show_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static ScrArea * find_area_image_empty(bContext *C)
static wmOperatorStatus render_view_cancel_exec(bContext *C, wmOperator *)
static ScrArea * biggest_non_image_area(bContext *C)
void RENDER_OT_view_cancel(wmOperatorType *ot)
struct ReportList * reports
void wm_window_raise(wmWindow *win)
void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
void WM_window_dpi_set_userdef(const wmWindow *win)
wmWindow * WM_window_open(bContext *C, const char *title, const rcti *rect_unscaled, int space_type, bool toplevel, bool dialog, bool temp, eWindowAlignment alignment, void(*area_setup_fn)(bScreen *screen, ScrArea *area, void *user_data), void *area_setup_user_data)
bool WM_window_is_temp_screen(const wmWindow *win)
eWM_CapabilitiesFlag WM_capabilities_flag()
Scene * WM_window_get_active_scene(const wmWindow *win)
void wm_window_lower(wmWindow *win)
bScreen * WM_window_get_active_screen(const wmWindow *win)