Blender V5.3
wm_splash_screen.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2007 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
16
17#include <cstring>
18
19#include "DNA_screen_types.h"
20#include "DNA_userdef_types.h"
22
23#include "BLI_listbase.hh"
24#include "BLI_math_base_c.hh"
25#include "BLI_path_utils.hh"
26#include "BLI_utildefines.hh"
27
28#include "BKE_appdir.hh"
30#include "BKE_blender_version.h"
31#include "BKE_context.hh"
32#include "BKE_preferences.h"
33
34#include "BLT_translation.hh"
35
36#include "IMB_imbuf.hh"
37#include "IMB_imbuf_types.hh"
38
39#include "ED_datafiles.h"
40#include "ED_screen.hh"
41
42#include "RNA_access.hh"
43
44#include "UI_interface.hh"
45#include "UI_interface_icons.hh"
47#include "UI_resources.hh"
48
49#include "WM_api.hh"
50#include "WM_types.hh"
51
52#include "wm.hh"
53
54namespace blender {
55
56/* -------------------------------------------------------------------- */
59
61{
62 wmWindow *win = CTX_wm_window(C);
63 popup_block_close(C, win, block);
64}
65
66static void wm_block_splash_add_label(ui::Block *block, const char *label, int x, int y)
67{
68 if (!(label && label[0])) {
69 return;
70 }
71
72 block_emboss_set(block, ui::EmbossType::None);
73
74 ui::Button *but = uiDefBut(
75 block, ui::ButtonType::Label, label, 0, y, x, UI_UNIT_Y, nullptr, 0, 0, std::nullopt);
76 button_drawflag_disable(but, ui::BUT_TEXT_LEFT);
77 button_drawflag_enable(but, ui::BUT_TEXT_RIGHT);
78
79 /* Regardless of theme, this text should always be bright white. */
80 uchar color[4] = {255, 255, 255, 255};
81 button_color_set(but, color);
82
83 block_emboss_set(block, ui::EmbossType::Emboss);
84}
85
86#ifndef WITH_HEADLESS
88{
89 uchar *rct = ibuf->byte_data_for_write();
90 if (!rct) {
91 return;
92 }
93
94 const bTheme *btheme = ui::theme::theme_get();
95 const float roundness = btheme->tui.wcol_menu_back.roundness * UI_SCALE_FAC;
96 const int size = roundness * 20;
97
98 if (size < ibuf->x && size < ibuf->y) {
99 /* Y-axis initial offset. */
100 rct += 4 * (ibuf->y - size) * ibuf->x;
101
102 for (int y = 0; y < size; y++) {
103 for (int x = 0; x < size; x++, rct += 4) {
104 const float pixel = 1.0 / size;
105 const float u = pixel * x;
106 const float v = pixel * y;
107 const float distance = sqrt(u * u + v * v);
108
109 /* Pointer offset to the alpha value of pixel. */
110 /* NOTE: the left corner is flipped in the X-axis. */
111 const int offset_l = 4 * (size - x - x - 1) + 3;
112 const int offset_r = 4 * (ibuf->x - size) + 3;
113
114 if (distance > 1.0) {
115 rct[offset_l] = 0;
116 rct[offset_r] = 0;
117 }
118 else {
119 /* Create a single pixel wide transition for anti-aliasing.
120 * Invert the distance and map its range [0, 1] to [0, pixel]. */
121 const float fac = (1.0 - distance) * size;
122
123 if (fac > 1.0) {
124 continue;
125 }
126
127 const uchar alpha = unit_float_to_uchar_clamp(fac);
128 rct[offset_l] = alpha;
129 rct[offset_r] = alpha;
130 }
131 }
132
133 /* X-axis offset to the next row. */
134 rct += 4 * (ibuf->x - size);
135 }
136 }
137}
138
139/* Composite the Blender logo over a project splash image. */
141{
142 /* Magic numbers match logo positioning and size in default splash image. */
143 ImBuf *logo = ui::svg_icon_bitmap(ICON_BLENDER_LOGO_LARGE, ibuf->x * 0.127f, false);
144 if (logo == nullptr) {
145 return;
146 }
147
148 /* The monochrome logo has alpha in all channels, unpremultiply to get white with alpha. */
150
151 /* Rows are stored bottom to top. */
152 const int x = ibuf->x * 0.025f;
153 const int y = ibuf->y - int(ibuf->x * 0.02f) - logo->y;
154 IMB_rectblend(ibuf,
155 ibuf->byte_data_for_write(),
156 nullptr,
157 ibuf,
158 logo,
159 nullptr,
160 nullptr,
161 nullptr,
162 0.0f,
163 x,
164 y,
165 x,
166 y,
167 0,
168 0,
169 logo->x,
170 logo->y,
172 false);
173
174 IMB_freeImBuf(logo);
175}
176#endif /* !WITH_HEADLESS */
177
178std::string WM_project_splash_image_filepath(const Main *bmain)
179{
181 bmain, [](const bke::BlenderProject *project) -> std::string {
182 if (project == nullptr || project->get_splash_image_path().is_empty()) {
183 return "";
184 }
185 return BKE_blender_project_path_resolve(project->get_splash_image_path(), *project);
186 });
187}
188
190 const int width,
191 const bool add_logo)
192{
193 if (filepath.is_empty() || width <= 0) {
194 return nullptr;
195 }
196
198 if (ibuf == nullptr) {
199 return nullptr;
200 }
201
202 /* Convert float to byte image buffer. */
203 if (ibuf->byte_data() == nullptr) {
206 }
207 if (ibuf->byte_data() == nullptr || ibuf->x <= 0 || ibuf->y <= 0) {
208 IMB_freeImBuf(ibuf);
209 return nullptr;
210 }
211
212 /* Add an alpha channel if missing. */
214 ibuf->channels = 4;
215
216 /* Crop to 2:1 around the center. */
217 const int2 size(ibuf->x, ibuf->y);
218 const int2 crop_size(std::min(size.x, size.y * 2), std::max(std::min(size.y, size.x / 2), 1));
219 if (crop_size != size) {
220 IMB_crop(ibuf, (size - crop_size) / 2, crop_size);
221 }
222
223 /* Scale to fit specified width. */
224 const int height = std::max(width / 2, 1);
225 if (width != ibuf->x || height != ibuf->y) {
226 IMB_scale(ibuf, width, height, IMBScaleFilter::Box, false);
227 }
228
229#ifndef WITH_HEADLESS
230 if (add_logo) {
232 }
233#else
234 UNUSED_VARS(add_logo);
235#endif
236
237 return ibuf;
238}
239
240static ImBuf *wm_block_splash_image(const Main *bmain, int width, int *r_height)
241{
242 ImBuf *ibuf = nullptr;
243 int height = 0;
244#ifndef WITH_HEADLESS
246
247 if (ibuf == nullptr && U.app_template[0] != '\0') {
248 char splash_filepath[FILE_MAX];
249 char template_directory[FILE_MAX];
251 U.app_template, template_directory, sizeof(template_directory)))
252 {
253 BLI_path_join(splash_filepath, sizeof(splash_filepath), template_directory, "splash.png");
254 ibuf = IMB_load_image_from_filepath(splash_filepath, ImBufFlags::ByteData);
255 }
256 }
257
258 if (ibuf == nullptr) {
259 const char *custom_splash_path = BLI_getenv("BLENDER_CUSTOM_SPLASH");
260 if (custom_splash_path) {
261 ibuf = IMB_load_image_from_filepath(custom_splash_path, ImBufFlags::ByteData);
262 }
263 }
264
265 if (ibuf == nullptr) {
266 const uchar *splash_data = reinterpret_cast<const uchar *>(datatoc_splash_png);
267 size_t splash_data_size = datatoc_splash_png_size;
269 splash_data, splash_data_size, ImBufFlags::ByteData, "<splash screen>");
270 }
271
272 if (ibuf) {
273 ibuf->color_mode = ImColorMode::RGBA; /* The image might not have an alpha channel. */
274 height = (width * ibuf->y) / ibuf->x;
275 if (width != ibuf->x || height != ibuf->y) {
276 IMB_scale(ibuf, width, height, IMBScaleFilter::Box, false);
277 }
278
281 }
282
283#else
284 UNUSED_VARS(width);
285#endif
286 *r_height = height;
287 return ibuf;
288}
289
291 int *r_height,
292 int max_width,
293 int max_height)
294{
295 ImBuf *ibuf = nullptr;
296 int height = 0;
297 int width = max_width;
298#ifndef WITH_HEADLESS
299
300 const char *custom_splash_path = BLI_getenv("BLENDER_CUSTOM_SPLASH_BANNER");
301 if (custom_splash_path) {
302 ibuf = IMB_load_image_from_filepath(custom_splash_path, ImBufFlags::ByteData);
303 }
304
305 if (!ibuf) {
306 return nullptr;
307 }
308
309 ibuf->color_mode = ImColorMode::RGBA; /* The image might not have an alpha channel. */
310
311 width = ibuf->x;
312 height = ibuf->y;
313 if (width > 0 && height > 0 && (width > max_width || height > max_height)) {
314 const float splash_ratio = max_width / float(max_height);
315 const float banner_ratio = ibuf->x / float(ibuf->y);
316
317 if (banner_ratio > splash_ratio) {
318 /* The banner is wider than the splash image. */
319 width = max_width;
320 height = max_width / banner_ratio;
321 }
322 else if (banner_ratio < splash_ratio) {
323 /* The banner is taller than the splash image. */
324 height = max_height;
325 width = max_height * banner_ratio;
326 }
327 else {
328 width = max_width;
329 height = max_height;
330 }
331 if (width != ibuf->x || height != ibuf->y) {
332 IMB_scale(ibuf, width, height, IMBScaleFilter::Box, false);
333 }
334 }
335
337
338#else
339 UNUSED_VARS(max_height);
340#endif
341 *r_height = height;
342 *r_width = width;
343 return ibuf;
344}
345
349static void wm_block_splash_close_on_fileselect(bContext *C, void *arg1, void * /*arg2*/)
350{
351 wmWindow *win = CTX_wm_window(C);
352 if (!win) {
353 return;
354 }
355
356 /* Check for the event as this will run before the new window/area has been created. */
357 bool has_fileselect = false;
358 for (const wmEvent &event : win->runtime->event_queue) {
359 if (event.type == EVT_FILESELECT) {
360 has_fileselect = true;
361 break;
362 }
363 }
364
365 if (has_fileselect) {
366 wm_block_splash_close(C, static_cast<ui::Block *>(arg1));
367 }
368}
369
370#if defined(__APPLE__)
371/* Check if Blender is running under Rosetta for the purpose of displaying a splash screen warning.
372 * From Apple's WWDC 2020 Session - Explore the new system architecture of Apple Silicon Macs.
373 * Time code: 14:31 - https://developer.apple.com/videos/play/wwdc2020/10686/ */
374
375# include <sys/sysctl.h>
376
377static int is_using_macos_rosetta()
378{
379 int ret = 0;
380 size_t size = sizeof(ret);
381
382 if (sysctlbyname("sysctl.proc_translated", &ret, &size, nullptr, 0) != -1) {
383 return ret;
384 }
385 /* If "sysctl.proc_translated" is not present then must be native. */
386 if (errno == ENOENT) {
387 return 0;
388 }
389 return -1;
390}
391#endif /* __APPLE__ */
392
393static ui::Block *wm_block_splash_create(bContext *C, ARegion *region, void * /*arg*/)
394{
395 const uiStyle *style = ui::style_get_dpi();
396
397 ui::Block *block = block_begin(C, region, "splash", ui::EmbossType::Emboss);
398
399 /* Note on #BLOCK_NO_WIN_CLIP, the window size is not always synchronized
400 * with the OS when the splash shows, window clipping in this case gives
401 * ugly results and clipping the splash isn't useful anyway, just disable it #32938. */
402 block_flag_enable(block, ui::BLOCK_LOOP | ui::BLOCK_KEEP_OPEN | ui::BLOCK_NO_WIN_CLIP);
403 block_theme_style_set(block, ui::BLOCK_THEME_STYLE_POPUP);
404
405 int splash_width = style->widget.points * 45 * UI_SCALE_FAC;
406 CLAMP_MAX(splash_width, WM_window_native_pixel_x(CTX_wm_window(C)) * 0.7f);
407 int splash_height;
408
409 /* Would be nice to support caching this, so it only has to be re-read (and likely resized) on
410 * first draw or if the image changed. */
411 ImBuf *ibuf = wm_block_splash_image(CTX_data_main(C), splash_width, &splash_height);
412 /* This should never happen, if it does - don't crash. */
413 if (ibuf) [[likely]] {
414 ui::Button *but = uiDefButImage(
415 block, ibuf, 0, 0.5f * U.widget_unit, splash_width, splash_height, nullptr);
416
417 button_func_set(but, [block](bContext &C) { wm_block_splash_close(&C, block); });
418
421 splash_width - 8.0 * UI_SCALE_FAC,
422 splash_height - 13.0 * UI_SCALE_FAC);
423 }
424
425 /* Banner image passed through the environment, to overlay on the splash and
426 * indicate a custom Blender version. Transparency can be used. To replace the
427 * full splash screen, see BLENDER_CUSTOM_SPLASH. */
428 int banner_width = 0;
429 int banner_height = 0;
431 &banner_width, &banner_height, splash_width, splash_height);
432 if (bannerbuf) {
433 ui::Button *banner_but = uiDefButImage(
434 block, bannerbuf, 0, 0.5f * U.widget_unit, banner_width, banner_height, nullptr);
435
436 button_func_set(banner_but, [block](bContext &C) { wm_block_splash_close(&C, block); });
437 }
438
439 /* Floating project menu over the bottom right of the splash image, if a project is active or
440 * there are recent projects. */
441 const std::optional<std::string> project_name = BKE_blender_project_read_callback(
442 CTX_data_main(C), [](const bke::BlenderProject *project) -> std::optional<std::string> {
443 if (project == nullptr) {
444 return std::nullopt;
445 }
446 return project->get_name();
447 });
448 if (project_name || !BKE_blender_project_recent_get().is_empty()) {
449 const int project_margin = UI_UNIT_X / 2;
450 const int project_width = UI_UNIT_X * 8;
451 ui::Layout &project_layout = ui::block_layout(block,
454 splash_width - project_width - project_margin,
455 0.5f * U.widget_unit + project_margin +
456 UI_UNIT_Y,
457 project_width,
458 0,
459 0,
460 style);
461 project_layout.menu("WM_MT_splash_project",
462 project_name ? StringRef(*project_name) : IFACE_("Project"),
463 ICON_PROJECT);
464 }
465
466 const int layout_margin_x = UI_SCALE_FAC * 26;
467 ui::Layout &layout = ui::block_layout(block,
470 layout_margin_x,
471 0,
472 splash_width - (layout_margin_x * 2),
473 UI_SCALE_FAC * 110,
474 0,
475 style);
476
477 MenuType *mt;
478
479 /* Draw setup screen if no preferences have been saved yet. */
481 mt = WM_menutype_find("WM_MT_splash_quick_setup", true);
482
483 /* The #BLOCK_QUICK_SETUP flag prevents the button text from being left-aligned,
484 * as it is for all menus due to the #BLOCK_LOOP flag, see in #ui_def_but. */
485 block_flag_enable(block, ui::BLOCK_QUICK_SETUP);
486 }
487 else {
488 mt = WM_menutype_find("WM_MT_splash", true);
489 }
490
491 block_func_set(block, wm_block_splash_close_on_fileselect, block, nullptr);
492
493 if (mt) {
494 ui::menutype_draw(C, mt, &layout);
495 }
496
497/* Displays a warning if blender is being emulated via Rosetta (macOS) or XTA (Windows) */
498#if defined(__APPLE__) || defined(_M_X64)
499# if defined(__APPLE__)
500 if (is_using_macos_rosetta() > 0)
501# elif defined(_M_X64)
502 const char *proc_id = BLI_getenv("PROCESSOR_IDENTIFIER");
503 if (proc_id && strncmp(proc_id, "ARM", 3) == 0)
504# endif
505 {
507
508 ui::Layout &split = layout.split(0.725, true);
509 ui::Layout &row1 = split.row(true);
510 ui::Layout &row2 = split.row(true);
511
512 row1.label(RPT_("Intel binary detected. Expect reduced performance."),
513 ICON_STATUS_WARNING_FILLED);
514
515 PointerRNA op_ptr = row2.op("WM_OT_url_open",
517 ICON_URL,
520# if defined(__APPLE__)
522 &op_ptr,
523 "url",
524 "https://docs.blender.org/manual/en/latest/getting_started/installing/macos.html");
525# elif defined(_M_X64)
527 &op_ptr,
528 "url",
529 "https://docs.blender.org/manual/en/latest/getting_started/installing/windows.html");
530# endif
531
532 layout.separator();
533 }
534#endif
535
536 block_bounds_set_centered(block, 0);
537
538 return block;
539}
540
542 wmOperator * /*op*/,
543 const wmEvent * /*event*/)
544{
546
547 return OPERATOR_FINISHED;
548}
549
551{
552 ot->name = "Splash Screen";
553 ot->idname = "WM_OT_splash";
554 ot->description = "Open the splash screen with release info";
555
558}
559
561
562/* -------------------------------------------------------------------- */
565
566static ui::Block *wm_block_about_create(bContext *C, ARegion *region, void * /*arg*/)
567{
568 const uiStyle *style = ui::style_get_dpi();
569 const int dialog_width = style->widget.points * 42 * UI_SCALE_FAC;
570
571 ui::Block *block = block_begin(C, region, "about", ui::EmbossType::Emboss);
572
573 block_flag_enable(block, ui::BLOCK_KEEP_OPEN | ui::BLOCK_LOOP | ui::BLOCK_NO_WIN_CLIP);
574 block_theme_style_set(block, ui::BLOCK_THEME_STYLE_POPUP);
575
576 ui::Layout &layout = ui::block_layout(block,
579 0,
580 0,
581 dialog_width,
582 0,
583 0,
584 style);
585
586/* Blender logo. */
587#ifndef WITH_HEADLESS
588 constexpr bool show_color = false;
589 const float size = 0.2f * dialog_width;
590
591 ImBuf *ibuf = ui::svg_icon_bitmap(ICON_BLENDER_LOGO_LARGE, size, show_color);
592
593 if (ibuf) {
594 const bTheme *btheme = ui::theme::theme_get();
595 const uchar *color = btheme->tui.wcol_menu_back.text_sel;
596
597 /* The top margin. */
598 layout.row(false).separator(0.2f);
599
600 /* The logo image. */
602 uiDefButImage(block, ibuf, 0, U.widget_unit, ibuf->x, ibuf->y, show_color ? nullptr : color);
603
604 /* Padding below the logo. */
605 layout.row(false).separator(2.7f);
606 }
607#endif /* !WITH_HEADLESS */
608
609 ui::Layout &col = layout.column(true);
610
611 uiItemL_ex(&col, IFACE_("Blender"), ICON_NONE, true, false);
612
613 MenuType *mt = WM_menutype_find("WM_MT_splash_about", true);
614 if (mt) {
615 ui::menutype_draw(C, mt, &col);
616 }
617
618 block_bounds_set_centered(block, 22 * UI_SCALE_FAC);
619
620 return block;
621}
622
624 wmOperator * /*op*/,
625 const wmEvent * /*event*/)
626{
628
629 return OPERATOR_FINISHED;
630}
631
633{
634 ot->name = "About Blender";
635 ot->idname = "WM_OT_splash_about";
636 ot->description = "Open a window with information about Blender";
637
640}
641
643
644} // namespace blender
#define FILE_MAX
#define BLI_path_join(...)
#define RPT_(msgid)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define IFACE_(msgid)
#define UI_SCALE_FAC
int datatoc_splash_png_size
const char datatoc_splash_png[]
#define C
Definition RandGen.cpp:29
#define UI_UNIT_Y
#define UI_UNIT_X
#define UI_ITEM_NONE
#define CLAMP_MAX(a, c)
#define UNUSED_VARS(...)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
constexpr const char * c_str() const
constexpr StringRef()
constexpr bool is_empty() const
float distance(float, float) RET
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
Definition abc_util.cc:68
const bTheme * theme_get()
const uiStyle * style_get_dpi()
void popup_block_invoke(bContext *C, BlockCreateFunc func, void *arg, FreeArgFunc arg_free, StructRNA *srna_owner=nullptr)
void menutype_draw(bContext *C, MenuType *mt, Layout *layout)
Layout & block_layout(Block *block, LayoutDirection direction, LayoutType type, int x, int y, int size, int em, int padding, const uiStyle *style)
ImBuf * svg_icon_bitmap(uint icon_id, float size, bool multicolor=false)
BMesh Iterators.
UserDef U
Definition blender.cc:58
static void wm_project_splash_logo_add(ImBuf *ibuf)
static void wm_block_splash_close_on_fileselect(bContext *C, void *arg1, void *)
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
std::string BKE_blender_project_path_resolve(StringRef path, const bke::BlenderProject &project)
static ui::Block * wm_block_about_create(bContext *C, ARegion *region, void *)
Vector< RecentProject > BKE_blender_project_recent_get()
void IMB_unpremultiply_alpha(ImBuf *ibuf)
Definition filter.cc:444
void WM_OT_splash_about(wmOperatorType *ot)
std::string WM_project_splash_image_filepath(const Main *bmain)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
static void wm_block_splash_close(bContext *C, ui::Block *block)
@ IMB_BLEND_MIX
Definition IMB_imbuf.hh:204
MenuType * WM_menutype_find(const StringRef idname, bool quiet)
static ui::Block * wm_block_splash_create(bContext *C, ARegion *region, void *)
wmWindow * CTX_wm_window(const bContext *C)
ATTR_WARN_UNUSED_RESULT const BMVert * v
int WM_window_native_pixel_x(const wmWindow *win)
auto BKE_blender_project_read_callback(const Main *bmain, Fn lambda)
static wmOperatorStatus wm_splash_invoke(bContext *C, wmOperator *, const wmEvent *)
void IMB_crop(ImBuf *ibuf, const int2 &rect_pos, const int2 &rect_size)
Definition rectop.cc:470
static void wm_block_splash_image_roundcorners_add(ImBuf *ibuf)
static ImBuf * wm_block_splash_image(const Main *bmain, int width, int *r_height)
ImBuf * IMB_load_image_from_filepath(const char *filepath, ImBufFlags flags, ColorManagedColorspaceSettings *colorspace_settings=nullptr)
Definition readimage.cc:201
void IMB_rectblend(ImBuf *dbuf, uint8_t *dbuf_byte_data, float *dbuf_float_data, const ImBuf *obuf, const ImBuf *sbuf, unsigned short *dmask, const unsigned short *curvemask, const unsigned short *texmask, float mask_max, int destx, int desty, int origx, int origy, int srcx, int srcy, int width, int height, IMB_BlendMode mode, bool accumulate)
Definition rectop.cc:649
void IMB_freeImBuf(ImBuf *ibuf)
VecBase< int32_t, 2 > int2
unsigned char uchar
Definition BKE_text.h:58
static wmOperatorStatus wm_splash_about_invoke(bContext *C, wmOperator *, const wmEvent *)
bool BKE_appdir_app_template_id_search(const char *app_template, char *path, size_t path_maxncpy) ATTR_NONNULL(1)
Definition appdir.cc:1127
sqrt(x)+1/max(0
ImBuf * WM_project_splash_image_load(const StringRefNull filepath, const int width, const bool add_logo)
static void wm_block_splash_add_label(ui::Block *block, const char *label, int x, int y)
ImBuf * IMB_load_image_from_memory(const unsigned char *mem, size_t size, ImBufFlags flags, const char *descr, const char *filepath=nullptr, ColorManagedColorspaceSettings *colorspace_settings=nullptr)
Definition readimage.cc:132
bool WM_operator_winactive(bContext *C)
Main * CTX_data_main(const bContext *C)
void IMB_byte_from_float(ImBuf *ibuf)
static ImBuf * wm_block_splash_banner_image(int *r_width, int *r_height, int max_width, int max_height)
bool IMB_scale(ImBuf *ibuf, int2 new_size, IMBScaleFilter filter, bool threaded=true)
Definition scaling.cc:467
void WM_OT_splash(wmOperatorType *ot)
void IMB_free_float_pixels(ImBuf *ibuf)
const char * BKE_blender_version_string()
Definition blender.cc:147
const char * BLI_getenv(const char *env) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
void IMB_premultiply_alpha(ImBuf *ibuf)
Definition filter.cc:382
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
uiWidgetColors wcol_menu_back
ThemeUI tui
const uint8_t * byte_data() const
uint8_t * byte_data_for_write()
Definition allocimbuf.cc:60
ImColorMode color_mode
ListBaseT< wmEvent > event_queue
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 menu(MenuType *mt, std::optional< StringRef > name, int icon)
Layout & split(float percentage, bool align)
Layout & column(bool align)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
Layout & row(bool align)
wmEventType type
Definition WM_types.hh:817
const char * description
Definition WM_types.hh:1115
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1165
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1141
bke::WindowRuntime * runtime
uiFontStyle widget
unsigned char text_sel[4]