Blender V5.3
interface_template_status.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <fmt/format.h>
10
11#include "BKE_blender_version.h"
12#include "BKE_context.hh"
13#include "BKE_global.hh"
14#include "BKE_layer.hh"
15#include "BKE_main.hh"
16#include "BKE_report.hh"
17#include "BKE_screen.hh"
18#include "BKE_workspace.hh"
19
20#include "BLI_listbase.hh"
21#include "BLI_math_matrix_c.hh"
22#include "BLI_math_vector_c.hh"
23#include "BLI_rect.hh"
24#include "BLI_string.hh"
25
26#include "BLF_api.hh"
27#include "BLT_translation.hh"
28
29#include "DNA_space_types.h"
30#include "DNA_workspace_types.h"
31
32#include "ED_info.hh"
33#include "ED_screen_types.hh"
34
35#include "WM_api.hh"
36
38#include "interface_intern.hh"
39
40namespace blender::ui {
41
42/* Maximum width for a Status Bar report */
43#define REPORT_BANNER_MAX_WIDTH (800.0f * UI_SCALE_FAC)
44
46{
47 ReportList *reports = CTX_wm_reports(C);
48 Report *report = BKE_reports_last_displayable(reports);
49 const uiStyle *style = style_get();
50
51 Button *but;
52
53 /* if the report display has timed out, don't show */
54 if (!reports->reporttimer) {
55 return;
56 }
57
58 ReportTimerInfo *rti = static_cast<ReportTimerInfo *>(reports->reporttimer->customdata);
59
60 if (!rti || rti->widthfac == 0.0f || !report) {
61 return;
62 }
63
64 Layout &ui_abs = layout->absolute(false);
65 Block *block = ui_abs.block();
66 EmbossType previous_emboss = block_emboss_get(block);
67
68 uchar report_icon_color[4];
69 uchar report_text_color[4];
70
72 icon_colorid_from_report_type(report->type), SPACE_INFO, report_icon_color);
74 UI_text_colorid_from_report_type(report->type), SPACE_INFO, report_text_color);
75 report_text_color[3] = 255; /* This theme color is RGB only, so have to set alpha here. */
76
77 if (rti->flash_progress <= 1.0) {
78 /* Flash report briefly according to progress through fade-out duration. */
79 const int brighten_amount = int(32 * (1.0f - rti->flash_progress));
80 add_v3_uchar_clamped(report_icon_color, brighten_amount);
81 }
82
83 fontstyle_set(&style->widget);
84 int width = BLF_width(style->widget.uifont_id, report->message, report->len);
85 width = min_ii(width, int(REPORT_BANNER_MAX_WIDTH));
86 width = min_ii(int(rti->widthfac * width), width);
87 width = max_ii(width, 10 * UI_SCALE_FAC);
88
89 block_align_begin(block);
90
91 /* Background for icon. */
92 but = uiDefBut(block,
94 "",
95 0,
96 0,
97 UI_UNIT_X + (6 * UI_SCALE_FAC),
99 nullptr,
100 0.0f,
101 0.0f,
102 "");
103 /* #ButtonType::Roundbox's background color is set in `but->col`. */
104 copy_v4_v4_uchar(but->col, report_icon_color);
105
106 /* Background for the rest of the message. */
107 but = uiDefBut(block,
109 "",
110 UI_UNIT_X + (6 * UI_SCALE_FAC),
111 0,
112 UI_UNIT_X + width,
113 UI_UNIT_Y,
114 nullptr,
115 0.0f,
116 0.0f,
117 "");
118 /* Use icon background at low opacity to highlight, but still contrasting with area TH_TEXT. */
119 copy_v3_v3_uchar(but->col, report_icon_color);
120 but->col[3] = 64;
121
122 block_align_end(block);
124
125 /* The report icon itself. */
126 but = uiDefIconButO(block,
128 "SCREEN_OT_info_log_show",
131 (3 * UI_SCALE_FAC),
132 0,
133 UI_UNIT_X,
134 UI_UNIT_Y,
135 TIP_("Click to open the info editor"));
136 copy_v4_v4_uchar(but->col, report_text_color);
137
138 /* The report message. */
139 but = uiDefButO(block,
141 "SCREEN_OT_info_log_show",
143 report->message,
144 UI_UNIT_X,
145 0,
146 width + UI_UNIT_X,
147 UI_UNIT_Y,
148 TIP_("Show in Info Log"));
149
150 block_emboss_set(block, previous_emboss);
151}
152
153static bool uiTemplateInputStatusAzone(Layout *layout, const AZone *az, const ARegion *region)
154{
155 if (az->type == AZONE_AREA) {
156 layout->label(nullptr, ICON_MOUSE_LMB_DRAG);
157 layout->separator(-0.2f);
158 layout->label(IFACE_("Split/Dock"), ICON_NONE);
159 layout->separator(0.6f);
160 layout->label("", ICON_EVENT_SHIFT);
161 layout->separator(-0.4f);
162 layout->label(nullptr, ICON_MOUSE_LMB_DRAG);
163 layout->separator(-0.2f);
164 layout->label(IFACE_("Duplicate into Window"), ICON_NONE);
165 layout->separator(0.6f);
166 layout->label("", ICON_EVENT_CTRL);
167 layout->separator(event_icon_offset(ICON_EVENT_CTRL));
168 layout->label(nullptr, ICON_MOUSE_LMB_DRAG);
169 layout->separator(-0.2f);
170 layout->label(IFACE_("Swap Areas"), ICON_NONE);
171 return true;
172 }
173
174 if (az->type == AZONE_REGION_QUAD) {
175 layout->label(nullptr, ICON_MOUSE_LMB_DRAG);
176 layout->separator(-0.2f);
177 layout->label(IFACE_("Resize Quadrants"), ICON_NONE);
178 return true;
179 }
180
181 if (az->type == AZONE_REGION) {
182 layout->label(nullptr, ICON_MOUSE_LMB_DRAG);
183 layout->separator(-0.2f);
184 layout->label((region->runtime->visible) ? IFACE_("Resize Region") :
185 IFACE_("Show Hidden Region"),
186 ICON_NONE);
187 return true;
188 }
189
190 return false;
191}
192
194{
195 /* On a gap between editors. */
196 rcti win_rect;
197 const int pad = int((3.0f * UI_SCALE_FAC) + U.pixelsize);
198 WM_window_screen_rect_calc(win, &win_rect);
199 BLI_rcti_pad(&win_rect, pad * -2, pad);
200 if (BLI_rcti_isect_pt_v(&win_rect, win->runtime->eventstate->xy)) {
201 /* Show options but not along left and right edges. */
202 BLI_rcti_pad(&win_rect, 0, pad * -3);
203 if (BLI_rcti_isect_pt_v(&win_rect, win->runtime->eventstate->xy)) {
204 /* No resize at top and bottom. */
205 row->label(nullptr, ICON_MOUSE_LMB_DRAG);
206 row->separator(-0.2f);
207 row->label(IFACE_("Resize"), ICON_NONE);
208 row->separator(0.6f);
209 }
210 row->label(nullptr, ICON_MOUSE_RMB);
211 row->separator(-0.9f);
212 row->label(IFACE_("Options"), ICON_NONE);
213 return true;
214 }
215 return false;
216}
217
219{
220 if (region->regiontype != RGN_TYPE_HEADER) {
221 return false;
222 }
223 /* Over a header region. */
224 row->label(nullptr, ICON_MOUSE_MMB_DRAG);
225 row->separator(-0.2f);
226 row->label(IFACE_("Pan"), ICON_NONE);
227 row->separator(0.6f);
228 row->label(nullptr, ICON_MOUSE_RMB);
229 row->separator(-0.9f);
230 row->label(IFACE_("Options"), ICON_NONE);
231 return true;
232}
233
235{
236 const Object *ob = CTX_data_active_object(C);
237 if (!ob) {
238 return false;
239 }
240
241 if (is_negative_m4(ob->object_to_world().ptr())) {
242 row->separator(1.0f);
243 row->label("", ICON_STATUS_WARNING_FILLED);
244 row->separator(-0.2f);
245 row->label(IFACE_("Active object has negative scale"), ICON_NONE);
247 row->separator(0.5f);
248 /* Return false to allow other items to be added after. */
249 return false;
250 }
251
252 if (!(fabsf(ob->scale[0] - ob->scale[1]) < 1e-4f && fabsf(ob->scale[1] - ob->scale[2]) < 1e-4f))
253 {
254 row->separator(1.0f);
255 row->label("", ICON_STATUS_WARNING_FILLED);
256 row->separator(-0.2f);
257 row->label(IFACE_("Active object has non-uniform scale"), ICON_NONE);
259 row->separator(0.5f);
260 /* Return false to allow other items to be added after. */
261 return false;
262 }
263
264 return false;
265}
266
268{
269 wmWindow *win = CTX_wm_window(C);
270 WorkSpace *workspace = CTX_wm_workspace(C);
271
272 /* Workspace status text has priority. */
273 if (!workspace->runtime->status.is_empty()) {
274 Layout &row = layout->row(true);
275 for (const bke::WorkSpaceStatusItem &item : workspace->runtime->status) {
276 if (item.space_factor != 0.0f) {
277 row.separator(item.space_factor);
278 }
279 else {
280 Button *but = uiItemL_ex(&row, item.text, item.icon, false, false);
281 if (item.inverted) {
283 }
284 const float offset = event_icon_offset(item.icon);
285 if (offset != 0.0f) {
286 row.separator(offset);
287 }
288 }
289 }
290 return;
291 }
292
293 if (WM_window_modal_keymap_status_draw(C, win, *layout)) {
294 return;
295 }
296
297 bScreen *screen = CTX_wm_screen(C);
298 ARegion *region = screen->active_region;
299 Layout &row = layout->row(true);
300
301 if (region == nullptr) {
302 /* Check if over an action zone. */
303 for (ScrArea &area_iter : screen->areabase) {
304 for (AZone &az : area_iter.actionzones) {
305 if (BLI_rcti_isect_pt_v(&az.rect, win->runtime->eventstate->xy)) {
306 region = az.region;
307 if (uiTemplateInputStatusAzone(&row, &az, region)) {
308 return;
309 }
310 break;
311 }
312 }
313 }
314 }
315
317 if (!area) {
318 /* Are we in a global area? */
319 for (ScrArea &global_area : win->global_areas.areabase) {
320 if (BLI_rcti_isect_pt_v(&global_area.totrct, win->runtime->eventstate->xy)) {
321 area = &global_area;
322 break;
323 }
324 }
325 }
326
327 if (!area) {
328 /* Outside of all areas. */
329 return;
330 }
331
332 if (!region && win && uiTemplateInputStatusBorder(win, &row)) {
333 /* On a gap between editors. */
334 return;
335 }
336
337 if (region && uiTemplateInputStatusHeader(region, &row)) {
338 /* Over a header region. */
339 return;
340 }
341
342 if (area && area->spacetype == SPACE_VIEW3D && uiTemplateInputStatus3DView(C, &row)) {
343 /* Specific to 3DView. */
344 return;
345 }
346
347 if (!area || !region) {
348 /* Keymap status only if over a region in an area. */
349 return;
350 }
351
352 /* Otherwise should cursor keymap status. */
353 for (int i = 0; i < 3; i++) {
355
358 const char *msg_drag = CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT,
360
361 if (msg) {
362 row.label("", (ICON_MOUSE_LMB + i));
363 row.separator(-0.9f);
364 row.label(msg, ICON_NONE);
365 row.separator(0.6f);
366 }
367
368 if (msg_drag) {
369 row.label("", (ICON_MOUSE_LMB_DRAG + i));
370 row.separator(-0.4f);
371 row.label(msg_drag, ICON_NONE);
372 row.separator(0.6f);
373 }
374 }
375}
376
377static std::string template_status_tooltip(bContext *C, void * /*argN*/, const StringRef /*tip*/)
378{
379 Main *bmain = CTX_data_main(C);
380 std::string tooltip_message;
381
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")),
388 writer_ver_str);
389 }
390 if (bmain->is_asset_edit_file) {
391 if (!tooltip_message.empty()) {
392 tooltip_message += "\n\n";
393 }
394 tooltip_message += RPT_(
395 "This file is managed by the Blender asset system and cannot be overridden");
396 }
398 if (!tooltip_message.empty()) {
399 tooltip_message += "\n\n";
400 }
401 tooltip_message += RPT_("OpenColorIO configuration failed to load");
402 }
404 if (!tooltip_message.empty()) {
405 tooltip_message += "\n\n";
406 }
407 tooltip_message += RPT_(
408 "Displays, views or color spaces in this file were missing and have been changed");
409 }
410
411 return tooltip_message;
412}
413
415{
416 Main *bmain = CTX_data_main(C);
417 Scene *scene = CTX_data_scene(C);
418 ViewLayer *view_layer = CTX_data_view_layer(C);
419 Layout &row = layout->row(true);
420
421 const char *status_info_txt = ED_info_statusbar_string_ex(
422 bmain, scene, view_layer, (U.statusbar_flag & ~STATUSBAR_SHOW_VERSION));
423 /* True when the status is populated (delimiters required for following items). */
424 bool has_status_info = false;
425
426 if (status_info_txt[0]) {
427 row.label(status_info_txt, ICON_NONE);
428 has_status_info = true;
429 }
430
431 if (U.statusbar_flag & STATUSBAR_SHOW_EXTENSIONS_UPDATES) {
433
434 /* Special case, always show an alert for any blocked extensions. */
435 if (wm->extensions_blocked > 0) {
436 if (has_status_info) {
437 row.separator(-0.5f);
438 row.label("|", ICON_NONE);
439 row.separator(-0.5f);
440 }
442 /* This operator also works fine for blocked extensions. */
443 row.op("EXTENSIONS_OT_userpref_show_for_update", "", ICON_STATUS_WARNING_FILLED);
444 Button *but = layout->block()->buttons_ptrs.last().get();
445 uchar color[4];
448
449 BLI_str_format_integer_unit(but->icon_overlay_text.text, wm->extensions_blocked);
451
452 row.separator(1.0f);
453 has_status_info = true;
454 }
455
456 if ((G.f & G_FLAG_INTERNET_ALLOW) == 0) {
457 if (has_status_info) {
458 row.separator(-0.5f);
459 row.label("|", ICON_NONE);
460 row.separator(-0.5f);
461 }
462
464 row.label("", ICON_INTERNET_OFFLINE);
465 }
466 else {
468 row.op("EXTENSIONS_OT_userpref_show_online", "", ICON_INTERNET_OFFLINE);
469 Button *but = layout->block()->buttons_ptrs.last().get();
470 uchar color[4];
473 }
474
475 row.separator(1.0f);
476 has_status_info = true;
477 }
478 else if ((wm->extensions_updates > 0) ||
479 (wm->extensions_updates == WM_EXTENSIONS_UPDATE_CHECKING))
480 {
481 int icon = ICON_INTERNET;
482 if (wm->extensions_updates == WM_EXTENSIONS_UPDATE_CHECKING) {
483 icon = ICON_UV_SYNC_SELECT;
484 }
485
486 if (has_status_info) {
487 row.separator(-0.5f);
488 row.label("|", ICON_NONE);
489 row.separator(-0.5f);
490 }
492 row.op("EXTENSIONS_OT_userpref_show_for_update", "", icon);
493 Button *but = layout->block()->buttons_ptrs.last().get();
494 uchar color[4];
497
498 if (wm->extensions_updates > 0) {
499 BLI_str_format_integer_unit(but->icon_overlay_text.text, wm->extensions_updates);
501 }
502
503 row.separator(1.0f);
504 has_status_info = true;
505 }
506 }
507
508 if (!BKE_main_has_issues(bmain)) {
509 if (U.statusbar_flag & STATUSBAR_SHOW_VERSION) {
510 if (has_status_info) {
511 row.separator(-0.5f);
512 row.label("|", ICON_NONE);
513 row.separator(-0.5f);
514 }
515 const char *status_info_d_txt = ED_info_statusbar_string_ex(
516 bmain, scene, view_layer, STATUSBAR_SHOW_VERSION);
517 row.label(status_info_d_txt, ICON_NONE);
518 }
519 return;
520 }
521
523 bmain, scene, view_layer, STATUSBAR_SHOW_VERSION);
524 std::string warning_message;
525
526 /* Blender version part is shown as warning area when there are forward compatibility issues with
527 * currently loaded .blend file. */
529 warning_message = version_string;
530 }
531 else {
532 /* For other issues, still show the version if enabled. */
533 if (U.statusbar_flag & STATUSBAR_SHOW_VERSION) {
534 layout->label(version_string, ICON_NONE);
535 }
536 }
537
538 /* Color space warning. */
540 if (!warning_message.empty()) {
541 warning_message = warning_message + " ";
542 }
543 warning_message = warning_message + RPT_("Color Management");
544 }
545
546 const uiStyle *style = style_get();
547 Layout &ui_abs = layout->absolute(false);
548 Block *block = ui_abs.block();
549 EmbossType previous_emboss = block_emboss_get(block);
550
551 fontstyle_set(&style->widget);
552 const int width = max_ii(
553 int(BLF_width(style->widget.uifont_id, warning_message.c_str(), warning_message.size())),
554 int(10 * UI_SCALE_FAC));
555
556 block_align_begin(block);
557
558 /* Background for icon. */
559 Button *but = uiDefBut(block,
561 "",
562 0,
563 0,
564 UI_UNIT_X + (6 * UI_SCALE_FAC),
565 UI_UNIT_Y,
566 nullptr,
567 0.0f,
568 0.0f,
569 "");
570 /* #ButtonType::Roundbox's background color is set in `but->col`. */
572
573 if (!warning_message.empty()) {
574 /* Background for the rest of the message. */
575 but = uiDefBut(block,
577 "",
578 UI_UNIT_X + (6 * UI_SCALE_FAC),
579 0,
580 UI_UNIT_X + width,
581 UI_UNIT_Y,
582 nullptr,
583 0.0f,
584 0.0f,
585 "");
586
587 /* Use icon background at low opacity to highlight, but still contrasting with area TH_TEXT. */
589 but->col[3] = 64;
590 }
591
592 block_align_end(block);
594
595 /* The warning icon itself. */
596 but = uiDefIconBut(block,
598 ICON_STATUS_WARNING_FILLED,
599 int(3 * UI_SCALE_FAC),
600 0,
601 UI_UNIT_X,
602 UI_UNIT_Y,
603 nullptr,
604 0.0f,
605 0.0f,
606 std::nullopt);
607 button_func_tooltip_set(but, template_status_tooltip, nullptr, nullptr);
609 but->col[3] = 255; /* This theme color is RBG only, so have to set alpha here. */
610
611 /* The warning message, if any. */
612 if (!warning_message.empty()) {
613 but = uiDefBut(block,
615 warning_message.c_str(),
616 UI_UNIT_X,
617 0,
618 short(width + UI_UNIT_X),
619 UI_UNIT_Y,
620 nullptr,
621 0.0f,
622 0.0f,
623 std::nullopt);
624 button_func_tooltip_set(but, template_status_tooltip, nullptr, nullptr);
625 }
626
627 block_emboss_set(block, previous_emboss);
628}
629
630} // namespace blender::ui
#define RPT_(msgid)
#define TIP_(msgid)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define IFACE_(msgid)
#define SPACE_TYPE_ANY
#define UI_SCALE_FAC
#define C
Definition RandGen.cpp:29
#define UI_UNIT_Y
#define UI_UNIT_X
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)
UserDef U
Definition blender.cc:58
Report * BKE_reports_last_displayable(ReportList *reports)
Definition report.cc:381
float BLF_width(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
Definition blf.cc:835
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)
@ TH_INFO_WARNING_TEXT
ViewLayer * CTX_data_view_layer(const bContext *C)
Global G
Definition blender.cc:57
const char * WM_window_cursor_keymap_status_get(const wmWindow *win, int button_index, int type_index)
unsigned char uchar
Definition BKE_text.h:58
wmWindowManager * CTX_wm_manager(const bContext *C)
bool BKE_main_has_issues(const Main *bmain)
Definition main.cc:649
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
Definition screen.cc:1226
@ G_FLAG_INTERNET_OVERRIDE_PREF_OFFLINE
@ G_FLAG_INTERNET_ALLOW
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)
Definition rct.cc:643
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)
Definition blender.cc:157
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)
#define fabsf
bke::ARegionRuntime * runtime
eRegion_Type regiontype
ARegion * region
MainColorspace colorspace
Definition BKE_main.hh:371
short versionfile
Definition BKE_main.hh:269
bool is_asset_edit_file
Definition BKE_main.hh:288
bool has_forward_compatibility_issues
Definition BKE_main.hh:281
wmTimer * reporttimer
Definition BKE_report.hh:86
const char * message
Definition BKE_report.hh:73
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
IconTextOverlay icon_overlay_text
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)
Layout & row(bool align)
void emboss_set(EmbossType emboss)
bke::WindowRuntime * runtime
uiFontStyle widget