Blender V5.0
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.h"
21#include "BLI_math_matrix.h"
22#include "BLI_math_vector.h"
23#include "BLI_rect.h"
24#include "BLI_string.h"
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
40/* Maximum width for a Status Bar report */
41#define REPORT_BANNER_MAX_WIDTH (800.0f * UI_SCALE_FAC)
42
44{
45 ReportList *reports = CTX_wm_reports(C);
46 Report *report = BKE_reports_last_displayable(reports);
47 const uiStyle *style = UI_style_get();
48
49 uiBut *but;
50
51 /* if the report display has timed out, don't show */
52 if (!reports->reporttimer) {
53 return;
54 }
55
57
58 if (!rti || rti->widthfac == 0.0f || !report) {
59 return;
60 }
61
62 uiLayout *ui_abs = &layout->absolute(false);
63 uiBlock *block = ui_abs->block();
64 blender::ui::EmbossType previous_emboss = UI_block_emboss_get(block);
65
66 uchar report_icon_color[4];
67 uchar report_text_color[4];
68
70 UI_icon_colorid_from_report_type(report->type), SPACE_INFO, report_icon_color);
72 UI_text_colorid_from_report_type(report->type), SPACE_INFO, report_text_color);
73 report_text_color[3] = 255; /* This theme color is RGB only, so have to set alpha here. */
74
75 if (rti->flash_progress <= 1.0) {
76 /* Flash report briefly according to progress through fade-out duration. */
77 const int brighten_amount = int(32 * (1.0f - rti->flash_progress));
78 add_v3_uchar_clamped(report_icon_color, brighten_amount);
79 }
80
81 UI_fontstyle_set(&style->widget);
82 int width = BLF_width(style->widget.uifont_id, report->message, report->len);
83 width = min_ii(width, int(REPORT_BANNER_MAX_WIDTH));
84 width = min_ii(int(rti->widthfac * width), width);
85 width = max_ii(width, 10 * UI_SCALE_FAC);
86
88
89 /* Background for icon. */
90 but = uiDefBut(block,
92 0,
93 "",
94 0,
95 0,
96 UI_UNIT_X + (6 * UI_SCALE_FAC),
98 nullptr,
99 0.0f,
100 0.0f,
101 "");
102 /* #ButType::Roundbox's background color is set in `but->col`. */
103 copy_v4_v4_uchar(but->col, report_icon_color);
104
105 /* Background for the rest of the message. */
106 but = uiDefBut(block,
108 0,
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 UI_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 UI_block_emboss_set(block, previous_emboss);
151}
152
153static bool uiTemplateInputStatusAzone(uiLayout *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(ui_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) {
175 layout->label(nullptr, ICON_MOUSE_LMB_DRAG);
176 layout->separator(-0.2f);
177 layout->label((region->runtime->visible) ? IFACE_("Resize Region") :
178 IFACE_("Show Hidden Region"),
179 ICON_NONE);
180 return true;
181 }
182
183 return false;
184}
185
187{
188 /* On a gap between editors. */
189 rcti win_rect;
190 const int pad = int((3.0f * UI_SCALE_FAC) + U.pixelsize);
191 WM_window_screen_rect_calc(win, &win_rect);
192 BLI_rcti_pad(&win_rect, pad * -2, pad);
193 if (BLI_rcti_isect_pt_v(&win_rect, win->eventstate->xy)) {
194 /* Show options but not along left and right edges. */
195 BLI_rcti_pad(&win_rect, 0, pad * -3);
196 if (BLI_rcti_isect_pt_v(&win_rect, win->eventstate->xy)) {
197 /* No resize at top and bottom. */
198 row->label(nullptr, ICON_MOUSE_LMB_DRAG);
199 row->separator(-0.2f);
200 row->label(IFACE_("Resize"), ICON_NONE);
201 row->separator(0.6f);
202 }
203 row->label(nullptr, ICON_MOUSE_RMB);
204 row->separator(-0.9f);
205 row->label(IFACE_("Options"), ICON_NONE);
206 return true;
207 }
208 return false;
209}
210
212{
213 if (region->regiontype != RGN_TYPE_HEADER) {
214 return false;
215 }
216 /* Over a header region. */
217 row->label(nullptr, ICON_MOUSE_MMB_DRAG);
218 row->separator(-0.2f);
219 row->label(IFACE_("Pan"), ICON_NONE);
220 row->separator(0.6f);
221 row->label(nullptr, ICON_MOUSE_RMB);
222 row->separator(-0.9f);
223 row->label(IFACE_("Options"), ICON_NONE);
224 return true;
225}
226
228{
229 const Object *ob = CTX_data_active_object(C);
230 if (!ob) {
231 return false;
232 }
233
234 if (is_negative_m4(ob->object_to_world().ptr())) {
235 row->separator(1.0f);
236 row->label("", ICON_ERROR);
237 row->separator(-0.2f);
238 row->label(IFACE_("Active object has negative scale"), ICON_NONE);
240 row->separator(0.5f);
241 /* Return false to allow other items to be added after. */
242 return false;
243 }
244
245 if (!(fabsf(ob->scale[0] - ob->scale[1]) < 1e-4f && fabsf(ob->scale[1] - ob->scale[2]) < 1e-4f))
246 {
247 row->separator(1.0f);
248 row->label("", ICON_ERROR);
249 row->separator(-0.2f);
250 row->label(IFACE_("Active object has non-uniform scale"), ICON_NONE);
252 row->separator(0.5f);
253 /* Return false to allow other items to be added after. */
254 return false;
255 }
256
257 return false;
258}
259
261{
262 wmWindow *win = CTX_wm_window(C);
263 WorkSpace *workspace = CTX_wm_workspace(C);
264
265 /* Workspace status text has priority. */
266 if (!workspace->runtime->status.is_empty()) {
267 uiLayout *row = &layout->row(true);
268 for (const blender::bke::WorkSpaceStatusItem &item : workspace->runtime->status) {
269 if (item.space_factor != 0.0f) {
270 row->separator(item.space_factor);
271 }
272 else {
273 uiBut *but = uiItemL_ex(row, item.text, item.icon, false, false);
274 if (item.inverted) {
276 }
277 const float offset = ui_event_icon_offset(item.icon);
278 if (offset != 0.0f) {
279 row->separator(offset);
280 }
281 }
282 }
283 return;
284 }
285
286 if (WM_window_modal_keymap_status_draw(C, win, layout)) {
287 return;
288 }
289
290 bScreen *screen = CTX_wm_screen(C);
291 ARegion *region = screen->active_region;
292 uiLayout *row = &layout->row(true);
293
294 if (region == nullptr) {
295 /* Check if over an action zone. */
296 LISTBASE_FOREACH (ScrArea *, area_iter, &screen->areabase) {
297 LISTBASE_FOREACH (AZone *, az, &area_iter->actionzones) {
298 if (BLI_rcti_isect_pt_v(&az->rect, win->eventstate->xy)) {
299 region = az->region;
300 if (uiTemplateInputStatusAzone(row, az, region)) {
301 return;
302 }
303 break;
304 }
305 }
306 }
307 }
308
310 if (!area) {
311 /* Are we in a global area? */
312 LISTBASE_FOREACH (ScrArea *, global_area, &win->global_areas.areabase) {
313 if (BLI_rcti_isect_pt_v(&global_area->totrct, win->eventstate->xy)) {
314 area = global_area;
315 break;
316 }
317 }
318 }
319
320 if (!area) {
321 /* Outside of all areas. */
322 return;
323 }
324
325 if (!region && win && uiTemplateInputStatusBorder(win, row)) {
326 /* On a gap between editors. */
327 return;
328 }
329
330 if (region && uiTemplateInputStatusHeader(region, row)) {
331 /* Over a header region. */
332 return;
333 }
334
335 if (area && area->spacetype == SPACE_VIEW3D && uiTemplateInputStatus3DView(C, row)) {
336 /* Specific to 3DView. */
337 return;
338 }
339
340 if (!area || !region) {
341 /* Keymap status only if over a region in an area. */
342 return;
343 }
344
345 /* Otherwise should cursor keymap status. */
346 for (int i = 0; i < 3; i++) {
348
351 const char *msg_drag = CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT,
353
354 if (msg) {
355 row->label("", (ICON_MOUSE_LMB + i));
356 row->separator(-0.9f);
357 row->label(msg, ICON_NONE);
358 row->separator(0.6f);
359 }
360
361 if (msg_drag) {
362 row->label("", (ICON_MOUSE_LMB_DRAG + i));
363 row->separator(-0.4f);
364 row->label(msg_drag, ICON_NONE);
365 row->separator(0.6f);
366 }
367 }
368}
369
371 void * /*argN*/,
372 const blender::StringRef /*tip*/)
373{
374 Main *bmain = CTX_data_main(C);
375 std::string tooltip_message;
376
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")),
383 writer_ver_str);
384 }
385 if (bmain->is_asset_edit_file) {
386 if (!tooltip_message.empty()) {
387 tooltip_message += "\n\n";
388 }
389 tooltip_message += RPT_(
390 "This file is managed by the Blender asset system and cannot be overridden");
391 }
393 if (!tooltip_message.empty()) {
394 tooltip_message += "\n\n";
395 }
396 tooltip_message += RPT_(
397 "Displays, views or color spaces in this file were missing and have been changed");
398 }
399
400 return tooltip_message;
401}
402
404{
405 Main *bmain = CTX_data_main(C);
406 Scene *scene = CTX_data_scene(C);
407 ViewLayer *view_layer = CTX_data_view_layer(C);
408 uiLayout *row = &layout->row(true);
409
410 const char *status_info_txt = ED_info_statusbar_string_ex(
411 bmain, scene, view_layer, (U.statusbar_flag & ~STATUSBAR_SHOW_VERSION));
412 /* True when the status is populated (delimiters required for following items). */
413 bool has_status_info = false;
414
415 if (status_info_txt[0]) {
416 row->label(status_info_txt, ICON_NONE);
417 has_status_info = true;
418 }
419
420 if (U.statusbar_flag & STATUSBAR_SHOW_EXTENSIONS_UPDATES) {
422
423 /* Special case, always show an alert for any blocked extensions. */
424 if (wm->extensions_blocked > 0) {
425 if (has_status_info) {
426 row->separator(-0.5f);
427 row->label("|", ICON_NONE);
428 row->separator(-0.5f);
429 }
431 /* This operator also works fine for blocked extensions. */
432 row->op("EXTENSIONS_OT_userpref_show_for_update", "", ICON_ERROR);
433 uiBut *but = layout->block()->buttons.last().get();
434 uchar color[4];
436 copy_v4_v4_uchar(but->col, color);
437
440
441 row->separator(1.0f);
442 has_status_info = true;
443 }
444
445 if ((G.f & G_FLAG_INTERNET_ALLOW) == 0) {
446 if (has_status_info) {
447 row->separator(-0.5f);
448 row->label("|", ICON_NONE);
449 row->separator(-0.5f);
450 }
451
453 row->label("", ICON_INTERNET_OFFLINE);
454 }
455 else {
457 row->op("EXTENSIONS_OT_userpref_show_online", "", ICON_INTERNET_OFFLINE);
458 uiBut *but = layout->block()->buttons.last().get();
459 uchar color[4];
461 copy_v4_v4_uchar(but->col, color);
462 }
463
464 row->separator(1.0f);
465 has_status_info = true;
466 }
467 else if ((wm->extensions_updates > 0) ||
469 {
470 int icon = ICON_INTERNET;
472 icon = ICON_UV_SYNC_SELECT;
473 }
474
475 if (has_status_info) {
476 row->separator(-0.5f);
477 row->label("|", ICON_NONE);
478 row->separator(-0.5f);
479 }
481 row->op("EXTENSIONS_OT_userpref_show_for_update", "", icon);
482 uiBut *but = layout->block()->buttons.last().get();
483 uchar color[4];
485 copy_v4_v4_uchar(but->col, color);
486
487 if (wm->extensions_updates > 0) {
490 }
491
492 row->separator(1.0f);
493 has_status_info = true;
494 }
495 }
496
497 if (!BKE_main_has_issues(bmain)) {
498 if (U.statusbar_flag & STATUSBAR_SHOW_VERSION) {
499 if (has_status_info) {
500 row->separator(-0.5f);
501 row->label("|", ICON_NONE);
502 row->separator(-0.5f);
503 }
504 const char *status_info_d_txt = ED_info_statusbar_string_ex(
505 bmain, scene, view_layer, STATUSBAR_SHOW_VERSION);
506 row->label(status_info_d_txt, ICON_NONE);
507 }
508 return;
509 }
510
512 bmain, scene, view_layer, STATUSBAR_SHOW_VERSION);
513 std::string warning_message;
514
515 /* Blender version part is shown as warning area when there are forward compatibility issues with
516 * currently loaded .blend file. */
518 warning_message = version_string;
519 }
520 else {
521 /* For other issues, still show the version if enabled. */
522 if (U.statusbar_flag & STATUSBAR_SHOW_VERSION) {
523 layout->label(version_string, ICON_NONE);
524 }
525 }
526
527 /* Color space warning. */
529 if (!warning_message.empty()) {
530 warning_message = warning_message + " ";
531 }
532 warning_message = warning_message + RPT_("Color Management");
533 }
534
535 const uiStyle *style = UI_style_get();
536 uiLayout *ui_abs = &layout->absolute(false);
537 uiBlock *block = ui_abs->block();
538 blender::ui::EmbossType previous_emboss = UI_block_emboss_get(block);
539
540 UI_fontstyle_set(&style->widget);
541 const int width = max_ii(
542 int(BLF_width(style->widget.uifont_id, warning_message.c_str(), warning_message.size())),
543 int(10 * UI_SCALE_FAC));
544
546
547 /* Background for icon. */
548 uiBut *but = uiDefBut(block,
550 0,
551 "",
552 0,
553 0,
554 UI_UNIT_X + (6 * UI_SCALE_FAC),
555 UI_UNIT_Y,
556 nullptr,
557 0.0f,
558 0.0f,
559 "");
560 /*# ButType::Roundbox's background color is set in `but->col`. */
562
563 if (!warning_message.empty()) {
564 /* Background for the rest of the message. */
565 but = uiDefBut(block,
567 0,
568 "",
569 UI_UNIT_X + (6 * UI_SCALE_FAC),
570 0,
571 UI_UNIT_X + width,
572 UI_UNIT_Y,
573 nullptr,
574 0.0f,
575 0.0f,
576 "");
577
578 /* Use icon background at low opacity to highlight, but still contrasting with area TH_TEXT. */
580 but->col[3] = 64;
581 }
582
583 UI_block_align_end(block);
585
586 /* The warning icon itself. */
587 but = uiDefIconBut(block,
589 0,
590 ICON_ERROR,
591 int(3 * UI_SCALE_FAC),
592 0,
593 UI_UNIT_X,
594 UI_UNIT_Y,
595 nullptr,
596 0.0f,
597 0.0f,
598 std::nullopt);
601 but->col[3] = 255; /* This theme color is RBG only, so have to set alpha here. */
602
603 /* The warning message, if any. */
604 if (!warning_message.empty()) {
605 but = uiDefBut(block,
607 0,
608 warning_message.c_str(),
609 UI_UNIT_X,
610 0,
611 short(width + UI_UNIT_X),
612 UI_UNIT_Y,
613 nullptr,
614 0.0f,
615 0.0f,
616 std::nullopt);
618 }
619
620 UI_block_emboss_set(block, previous_emboss);
621}
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:156
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
@ G_FLAG_INTERNET_ALLOW
bool BKE_main_has_issues(const Main *bmain)
Definition main.cc:474
Report * BKE_reports_last_displayable(ReportList *reports)
Definition report.cc:370
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)
Definition blf.cc:802
#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)
Definition rct.cc:629
void BLI_str_format_integer_unit(char dst[BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE], int number_to_format) ATTR_NONNULL(1)
Definition string.cc:1294
unsigned char uchar
#define RPT_(msgid)
#define TIP_(msgid)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define IFACE_(msgid)
@ RGN_TYPE_HEADER
@ SPACE_VIEW3D
@ SPACE_INFO
#define SPACE_TYPE_ANY
#define UI_SCALE_FAC
@ STATUSBAR_SHOW_VERSION
@ 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)
@ AZONE_REGION
@ AZONE_AREA
#define C
Definition RandGen.cpp:29
int UI_text_colorid_from_report_type(int type)
#define UI_UNIT_Y
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])
#define UI_UNIT_X
@ UI_BUT_ICON_INVERT
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)
@ TH_INFO_WARNING_TEXT
@ TH_WARNING
@ TH_TEXT
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)]
#define U
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
#define G(x, y, z)
#define fabsf
ARegionRuntimeHandle * runtime
bool is_missing_opencolorio_config
Definition BKE_main.hh:157
bool is_asset_edit_file
Definition BKE_main.hh:199
bool has_forward_compatibility_issues
Definition BKE_main.hh:192
short versionfile
Definition BKE_main.hh:181
MainColorspace colorspace
Definition BKE_main.hh:274
float scale[3]
wmTimer * reporttimer
Definition BKE_report.hh:82
int len
Definition BKE_report.hh:69
short type
Definition BKE_report.hh:66
const char * message
Definition BKE_report.hh:71
ListBase areabase
WorkSpaceRuntimeHandle * runtime
ListBase areabase
struct ARegion * active_region
blender::Vector< std::unique_ptr< uiBut > > buttons
IconTextOverlay icon_overlay_text
uchar col[4]
void alignment_set(blender::ui::LayoutAlign alignment)
uiBlock * block() const
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)
uiFontStyle widget
int xy[2]
Definition WM_types.hh:761
void * customdata
Definition WM_types.hh:965
struct wmEvent * eventstate
ScrAreaMap global_areas
i
Definition text_draw.cc:230
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)