43#define REPORT_BANNER_MAX_WIDTH (800.0f * UI_SCALE_FAC)
60 if (!rti || rti->
widthfac == 0.0f || !report) {
68 uchar report_icon_color[4];
69 uchar report_text_color[4];
75 report_text_color[3] = 255;
79 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);
177 layout->
label(
IFACE_(
"Resize Quadrants"), ICON_NONE);
182 layout->
label(
nullptr, ICON_MOUSE_LMB_DRAG);
185 IFACE_(
"Show Hidden Region"),
205 row->
label(
nullptr, ICON_MOUSE_LMB_DRAG);
210 row->
label(
nullptr, ICON_MOUSE_RMB);
224 row->
label(
nullptr, ICON_MOUSE_MMB_DRAG);
228 row->
label(
nullptr, ICON_MOUSE_RMB);
243 row->
label(
"", ICON_STATUS_WARNING_FILLED);
245 row->
label(
IFACE_(
"Active object has negative scale"), ICON_NONE);
255 row->
label(
"", ICON_STATUS_WARNING_FILLED);
257 row->
label(
IFACE_(
"Active object has non-uniform scale"), ICON_NONE);
285 if (offset != 0.0f) {
301 if (region ==
nullptr) {
347 if (!area || !region) {
353 for (
int i = 0; i < 3; i++) {
362 row.
label(
"", (ICON_MOUSE_LMB + i));
364 row.
label(msg, ICON_NONE);
369 row.
label(
"", (ICON_MOUSE_LMB_DRAG + i));
371 row.
label(msg_drag, ICON_NONE);
380 std::string tooltip_message;
383 char writer_ver_str[12];
385 writer_ver_str,
sizeof(writer_ver_str), bmain->
versionfile, -1);
386 tooltip_message += fmt::format(
387 fmt::runtime(
RPT_(
"File saved by newer Blender\n({}), expect loss of data")),
391 if (!tooltip_message.empty()) {
392 tooltip_message +=
"\n\n";
394 tooltip_message +=
RPT_(
395 "This file is managed by the Blender asset system and cannot be overridden");
398 if (!tooltip_message.empty()) {
399 tooltip_message +=
"\n\n";
401 tooltip_message +=
RPT_(
"OpenColorIO configuration failed to load");
404 if (!tooltip_message.empty()) {
405 tooltip_message +=
"\n\n";
407 tooltip_message +=
RPT_(
408 "Displays, views or color spaces in this file were missing and have been changed");
411 return tooltip_message;
424 bool has_status_info =
false;
426 if (status_info_txt[0]) {
427 row.
label(status_info_txt, ICON_NONE);
428 has_status_info =
true;
435 if (
wm->extensions_blocked > 0) {
436 if (has_status_info) {
438 row.
label(
"|", ICON_NONE);
443 row.
op(
"EXTENSIONS_OT_userpref_show_for_update",
"", ICON_STATUS_WARNING_FILLED);
453 has_status_info =
true;
457 if (has_status_info) {
459 row.
label(
"|", ICON_NONE);
464 row.
label(
"", ICON_INTERNET_OFFLINE);
468 row.
op(
"EXTENSIONS_OT_userpref_show_online",
"", ICON_INTERNET_OFFLINE);
476 has_status_info =
true;
478 else if ((
wm->extensions_updates > 0) ||
481 int icon = ICON_INTERNET;
483 icon = ICON_UV_SYNC_SELECT;
486 if (has_status_info) {
488 row.
label(
"|", ICON_NONE);
492 row.
op(
"EXTENSIONS_OT_userpref_show_for_update",
"", icon);
498 if (
wm->extensions_updates > 0) {
504 has_status_info =
true;
510 if (has_status_info) {
512 row.
label(
"|", ICON_NONE);
517 row.
label(status_info_d_txt, ICON_NONE);
524 std::string warning_message;
529 warning_message = version_string;
534 layout->
label(version_string, ICON_NONE);
540 if (!warning_message.empty()) {
541 warning_message = warning_message +
" ";
543 warning_message = warning_message +
RPT_(
"Color Management");
573 if (!warning_message.empty()) {
598 ICON_STATUS_WARNING_FILLED,
612 if (!warning_message.empty()) {
615 warning_message.c_str(),
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
int pad[32 - sizeof(int)]
#define REPORT_BANNER_MAX_WIDTH
void get_color_4ubv(int colorid, unsigned char col[4])
void get_color_type_4ubv(int colorid, int spacetype, unsigned char col[4])
int icon_from_report_type(int type)
int icon_colorid_from_report_type(int type)
static bool uiTemplateInputStatusHeader(ARegion *region, Layout *row)
const uiStyle * style_get()
void uiTemplateReportsBanner(Layout *layout, bContext *C)
void button_icon_indicator_color_set(Button *but, const uchar color[4])
void block_align_begin(Block *block)
void fontstyle_set(const uiFontStyle *fs)
Button * uiDefIconButO(Block *block, ButtonType type, StringRefNull opname, wm::OpCallContext opcontext, int icon, int x, int y, short width, short height, std::optional< StringRef > tip)
EmbossType block_emboss_get(Block *block)
void uiTemplateInputStatus(Layout *layout, bContext *C)
void button_func_tooltip_set(Button *but, ButtonToolTipFunc func, void *arg, FreeArgFunc free_arg)
Button * uiDefBut(Block *block, ButtonTypeWithPointerType but_and_ptr_type, StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< StringRef > tip)
Button * uiDefButO(Block *block, ButtonType type, StringRefNull opname, wm::OpCallContext opcontext, const std::optional< StringRef > str, int x, int y, short width, short height, std::optional< StringRef > tip)
void block_align_end(Block *block)
float event_icon_offset(const int icon_id)
void block_emboss_set(Block *block, EmbossType emboss)
Button * uiItemL_ex(Layout *layout, StringRef name, int icon, bool highlight, bool redalert)
void uiTemplateStatusInfo(Layout *layout, bContext *C)
static bool uiTemplateInputStatusBorder(wmWindow *win, Layout *row)
Button * uiDefIconBut(Block *block, ButtonTypeWithPointerType but_and_ptr_type, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< StringRef > tip)
static std::string template_status_tooltip(bContext *C, void *, const StringRef)
int UI_text_colorid_from_report_type(int type)
static bool uiTemplateInputStatus3DView(bContext *C, Layout *row)
static bool uiTemplateInputStatusAzone(Layout *layout, const AZone *az, const ARegion *region)
Report * BKE_reports_last_displayable(ReportList *reports)
float BLF_width(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
WorkSpace * CTX_wm_workspace(const bContext *C)
bool WM_window_modal_keymap_status_draw(bContext *C, wmWindow *win, ui::Layout &layout)
@ STATUSBAR_SHOW_EXTENSIONS_UPDATES
bool is_negative_m4(const float mat[4][4])
wmWindow * CTX_wm_window(const bContext *C)
MINLINE int max_ii(int a, int b)
ViewLayer * CTX_data_view_layer(const bContext *C)
const char * WM_window_cursor_keymap_status_get(const wmWindow *win, int button_index, int type_index)
wmWindowManager * CTX_wm_manager(const bContext *C)
bool BKE_main_has_issues(const Main *bmain)
MINLINE void add_v3_uchar_clamped(uchar r[3], int i)
MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4])
ScrArea ScrArea * BKE_screen_find_area_xy(const bScreen *screen, int spacetype, const int xy[2]) ATTR_NONNULL(1
@ G_FLAG_INTERNET_OVERRIDE_PREF_OFFLINE
Main * CTX_data_main(const bContext *C)
void BLI_str_format_integer_unit(char dst[BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE], int number_to_format) ATTR_NONNULL(1)
MINLINE void copy_v3_v3_uchar(unsigned char r[3], const unsigned char a[3])
Scene * CTX_data_scene(const bContext *C)
bScreen * CTX_wm_screen(const bContext *C)
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)
ReportList * CTX_wm_reports(const bContext *C)
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)
@ WM_EXTENSIONS_UPDATE_CHECKING
void WM_window_screen_rect_calc(const wmWindow *win, rcti *r_rect)
MINLINE int min_ii(int a, int b)
Object * CTX_data_active_object(const bContext *C)
const char * ED_info_statusbar_string_ex(Main *bmain, Scene *scene, ViewLayer *view_layer, const char statusbar_flag)
bke::ARegionRuntime * runtime
bool is_missing_opencolorio_config
bool is_failed_opencolorio_config
MainColorspace colorspace
bool has_forward_compatibility_issues
ListBaseT< ScrArea > areabase
ListBaseT< struct AZone > actionzones
bke::WorkSpaceRuntime * runtime
struct ARegion * active_region
ListBaseT< struct ScrArea > areabase
Vector< WorkSpaceStatusItem > status
Vector< std::unique_ptr< Button > > buttons_ptrs
void alignment_set(LayoutAlign alignment)
void label(StringRef name, int icon)
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
Layout & absolute(bool align=false)
void emboss_set(EmbossType emboss)
bke::WindowRuntime * runtime