41#define REPORT_BANNER_MAX_WIDTH (800.0f * UI_SCALE_FAC)
58 if (!rti || rti->
widthfac == 0.0f || !report) {
66 uchar report_icon_color[4];
67 uchar report_text_color[4];
73 report_text_color[3] = 255;
77 const int brighten_amount = int(32 * (1.0f - rti->
flash_progress));
128 "SCREEN_OT_info_log_show",
135 TIP_(
"Click to open the info editor"));
141 "SCREEN_OT_info_log_show",
148 TIP_(
"Show in Info Log"));
156 layout->
label(
nullptr, ICON_MOUSE_LMB_DRAG);
160 layout->
label(
"", ICON_EVENT_SHIFT);
162 layout->
label(
nullptr, ICON_MOUSE_LMB_DRAG);
164 layout->
label(
IFACE_(
"Duplicate into Window"), ICON_NONE);
166 layout->
label(
"", ICON_EVENT_CTRL);
168 layout->
label(
nullptr, ICON_MOUSE_LMB_DRAG);
175 layout->
label(
nullptr, ICON_MOUSE_LMB_DRAG);
178 IFACE_(
"Show Hidden Region"),
198 row->
label(
nullptr, ICON_MOUSE_LMB_DRAG);
203 row->
label(
nullptr, ICON_MOUSE_RMB);
217 row->
label(
nullptr, ICON_MOUSE_MMB_DRAG);
221 row->
label(
nullptr, ICON_MOUSE_RMB);
236 row->
label(
"", ICON_ERROR);
238 row->
label(
IFACE_(
"Active object has negative scale"), ICON_NONE);
248 row->
label(
"", ICON_ERROR);
250 row->
label(
IFACE_(
"Active object has non-uniform scale"), ICON_NONE);
266 if (!workspace->
runtime->status.is_empty()) {
278 if (offset != 0.0f) {
294 if (region ==
nullptr) {
340 if (!area || !region) {
346 for (
int i = 0;
i < 3;
i++) {
355 row->
label(
"", (ICON_MOUSE_LMB +
i));
357 row->
label(msg, ICON_NONE);
362 row->
label(
"", (ICON_MOUSE_LMB_DRAG +
i));
364 row->
label(msg_drag, ICON_NONE);
375 std::string tooltip_message;
378 char writer_ver_str[12];
380 writer_ver_str,
sizeof(writer_ver_str), bmain->
versionfile, -1);
381 tooltip_message += fmt::format(
382 fmt::runtime(
RPT_(
"File saved by newer Blender\n({}), expect loss of data")),
386 if (!tooltip_message.empty()) {
387 tooltip_message +=
"\n\n";
389 tooltip_message +=
RPT_(
390 "This file is managed by the Blender asset system and cannot be overridden");
393 if (!tooltip_message.empty()) {
394 tooltip_message +=
"\n\n";
396 tooltip_message +=
RPT_(
397 "Displays, views or color spaces in this file were missing and have been changed");
400 return tooltip_message;
413 bool has_status_info =
false;
415 if (status_info_txt[0]) {
416 row->
label(status_info_txt, ICON_NONE);
417 has_status_info =
true;
425 if (has_status_info) {
427 row->
label(
"|", ICON_NONE);
432 row->
op(
"EXTENSIONS_OT_userpref_show_for_update",
"", ICON_ERROR);
442 has_status_info =
true;
446 if (has_status_info) {
448 row->
label(
"|", ICON_NONE);
453 row->
label(
"", ICON_INTERNET_OFFLINE);
457 row->
op(
"EXTENSIONS_OT_userpref_show_online",
"", ICON_INTERNET_OFFLINE);
465 has_status_info =
true;
470 int icon = ICON_INTERNET;
472 icon = ICON_UV_SYNC_SELECT;
475 if (has_status_info) {
477 row->
label(
"|", ICON_NONE);
481 row->
op(
"EXTENSIONS_OT_userpref_show_for_update",
"", icon);
493 has_status_info =
true;
499 if (has_status_info) {
501 row->
label(
"|", ICON_NONE);
506 row->
label(status_info_d_txt, ICON_NONE);
513 std::string warning_message;
518 warning_message = version_string;
523 layout->
label(version_string, ICON_NONE);
529 if (!warning_message.empty()) {
530 warning_message = warning_message +
" ";
532 warning_message = warning_message +
RPT_(
"Color Management");
563 if (!warning_message.empty()) {
604 if (!warning_message.empty()) {
608 warning_message.c_str(),
void BKE_blender_version_blendfile_string_from_values(char *str_buff, const size_t str_buff_maxncpy, const short file_version, const short file_subversion)
WorkSpace * CTX_wm_workspace(const bContext *C)
ReportList * CTX_wm_reports(const bContext *C)
bScreen * CTX_wm_screen(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
@ G_FLAG_INTERNET_OVERRIDE_PREF_OFFLINE
bool BKE_main_has_issues(const Main *bmain)
Report * BKE_reports_last_displayable(ReportList *reports)
ScrArea ScrArea * BKE_screen_find_area_xy(const bScreen *screen, int spacetype, const int xy[2]) ATTR_NONNULL(1
float BLF_width(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
#define LISTBASE_FOREACH(type, var, list)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
bool is_negative_m4(const float mat[4][4])
MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4])
MINLINE void copy_v3_v3_uchar(unsigned char r[3], const unsigned char a[3])
MINLINE void add_v3_uchar_clamped(uchar r[3], int i)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
void BLI_rcti_pad(struct rcti *rect, int pad_x, int pad_y)
void BLI_str_format_integer_unit(char dst[BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE], int number_to_format) ATTR_NONNULL(1)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
@ STATUSBAR_SHOW_EXTENSIONS_UPDATES
@ WM_EXTENSIONS_UPDATE_CHECKING
const char * ED_info_statusbar_string_ex(Main *bmain, Scene *scene, ViewLayer *view_layer, const char statusbar_flag)
int UI_text_colorid_from_report_type(int type)
void UI_block_emboss_set(uiBlock *block, blender::ui::EmbossType emboss)
int UI_icon_from_report_type(int type)
void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg)
uiBut * uiDefIconBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
int UI_icon_colorid_from_report_type(int type)
uiBut * uiDefIconButO(uiBlock *block, ButType type, blender::StringRefNull opname, blender::wm::OpCallContext opcontext, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
const uiStyle * UI_style_get()
void UI_fontstyle_set(const uiFontStyle *fs)
void UI_block_align_begin(uiBlock *block)
blender::ui::EmbossType UI_block_emboss_get(uiBlock *block)
uiBut * uiDefButO(uiBlock *block, ButType type, blender::StringRefNull opname, blender::wm::OpCallContext opcontext, const std::optional< blender::StringRef > str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void UI_but_icon_indicator_color_set(uiBut *but, const uchar color[4])
uiBut * uiDefBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_block_align_end(uiBlock *block)
uiBut * uiItemL_ex(uiLayout *layout, blender::StringRef name, int icon, bool highlight, bool redalert)
void UI_GetThemeColorType4ubv(int colorid, int spacetype, unsigned char col[4])
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
int pad[32 - sizeof(int)]
const T & last(const int64_t n=0) const
float ui_event_icon_offset(const int icon_id)
void uiTemplateInputStatus(uiLayout *layout, bContext *C)
void uiTemplateStatusInfo(uiLayout *layout, bContext *C)
void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
static std::string ui_template_status_tooltip(bContext *C, void *, const blender::StringRef)
static bool uiTemplateInputStatusBorder(wmWindow *win, uiLayout *row)
static bool uiTemplateInputStatusAzone(uiLayout *layout, const AZone *az, const ARegion *region)
static bool uiTemplateInputStatus3DView(bContext *C, uiLayout *row)
static bool uiTemplateInputStatusHeader(ARegion *region, uiLayout *row)
#define REPORT_BANNER_MAX_WIDTH
ARegionRuntimeHandle * runtime
bool is_missing_opencolorio_config
bool has_forward_compatibility_issues
MainColorspace colorspace
WorkSpaceRuntimeHandle * runtime
struct ARegion * active_region
blender::Vector< std::unique_ptr< uiBut > > buttons
IconTextOverlay icon_overlay_text
void alignment_set(blender::ui::LayoutAlign alignment)
void label(blender::StringRef name, int icon)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
uiLayout & row(bool align)
uiLayout & absolute(bool align)
void emboss_set(blender::ui::EmbossType emboss)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
struct wmEvent * eventstate
bool WM_window_modal_keymap_status_draw(bContext *C, wmWindow *win, uiLayout *layout)
const char * WM_window_cursor_keymap_status_get(const wmWindow *win, int button_index, int type_index)
void WM_window_screen_rect_calc(const wmWindow *win, rcti *r_rect)