73 block,
UI_BTYPE_LABEL, 0,
label, 0, y, x,
UI_UNIT_Y,
nullptr, 0, 0,
nullptr);
78 uchar color[4] = {255, 255, 255, 255};
94 const int size = roundness * 20;
98 rct += 4 * (ibuf->
y -
size) * ibuf->
x;
100 for (
int y = 0; y <
size; y++) {
101 for (
int x = 0; x <
size; x++, rct += 4) {
102 const float pixel = 1.0 /
size;
103 const float u = pixel *
x;
104 const float v = pixel *
y;
105 const float distance =
sqrt(u * u +
v *
v);
109 const int offset_l = 4 * (size - x - x - 1) + 3;
110 const int offset_r = 4 * (ibuf->
x -
size) + 3;
112 if (distance > 1.0) {
119 const float fac = (1.0 -
distance) * size;
126 rct[offset_l] = alpha;
127 rct[offset_r] = alpha;
132 rct += 4 * (ibuf->
x -
size);
140 ImBuf *ibuf =
nullptr;
143 if (
U.app_template[0] !=
'\0') {
147 U.app_template, template_directory,
sizeof(template_directory)))
149 BLI_path_join(splash_filepath,
sizeof(splash_filepath), template_directory,
"splash.png");
154 if (ibuf ==
nullptr) {
158 splash_data, splash_data_size,
IB_rect,
nullptr,
"<splash screen>");
163 height = (width * ibuf->
y) / ibuf->
x;
164 if (width != ibuf->
x || height != ibuf->
y) {
190 bool has_fileselect =
false;
193 has_fileselect =
true;
198 if (has_fileselect) {
203#if defined(__APPLE__)
208# include <sys/sysctl.h>
210static int is_using_macos_rosetta()
213 size_t size =
sizeof(
ret);
215 if (sysctlbyname(
"sysctl.proc_translated", &
ret, &size,
nullptr, 0) != -1) {
219 if (errno == ENOENT) {
248 block, ibuf, 0, 0.5f *
U.widget_unit, splash_width, splash_height,
nullptr);
264 splash_width - (layout_margin_x * 2),
273 if (cfgdir.has_value()) {
299#if defined(__APPLE__) || defined(_M_X64)
300# if defined(__APPLE__)
301 if (is_using_macos_rosetta() > 0) {
302# elif defined(_M_X64)
303 if (strncmp(
BLI_getenv(
"PROCESSOR_IDENTIFIER"),
"ARM", 3) == 0) {
311 uiItemL(row1,
RPT_(
"Intel binary detected. Expect reduced performance."), ICON_ERROR);
322# if defined(__APPLE__)
326 "https://docs.blender.org/manual/en/latest/getting_started/installing/macos.html");
327# elif defined(_M_X64)
331 "https://docs.blender.org/manual/en/latest/getting_started/installing/windows.html");
352 ot->
name =
"Splash Screen";
354 ot->
description =
"Open the splash screen with release info";
368 constexpr bool show_color =
false;
383 float size = 0.2f * dialog_width;
429 ot->
name =
"About Blender";
431 ot->
description =
"Open a window with information about Blender";
bool BKE_appdir_app_template_id_search(const char *app_template, char *path, size_t path_maxncpy) ATTR_NONNULL(1)
#define BLENDER_USERPREF_FILE
std::optional< std::string > BKE_appdir_folder_id(int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
const char * BKE_blender_version_string(void)
wmWindow * CTX_wm_window(const bContext *C)
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
#define LISTBASE_FOREACH(type, var, list)
#define BLI_path_join(...)
const char * BLI_getenv(const char *env) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
ID and Library types, which are fundamental for SDNA.
int datatoc_splash_png_size
const char datatoc_splash_png[]
void IMB_premultiply_alpha(ImBuf *ibuf)
ImBuf * IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_SPACE])
bool IMB_scale(ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
Contains defines and structs used throughout the imbuf module.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
void UI_but_func_set(uiBut *but, std::function< void(bContext &)> func)
void UI_block_theme_style_set(uiBlock *block, char theme_style)
void UI_but_color_set(uiBut *but, const uchar color[4])
uiBut * uiDefBut(uiBlock *block, int type, int retval, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, const char *tip)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, PointerRNA *r_opptr)
void UI_popup_block_invoke(bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
uiLayout * UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const uiStyle *style)
const uiStyle * UI_style_get_dpi()
void UI_but_drawflag_enable(uiBut *but, int flag)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
uiBlock * UI_block_begin(const bContext *C, ARegion *region, std::string name, eUIEmbossType emboss)
void uiItemS(uiLayout *layout)
void UI_popup_block_close(bContext *C, wmWindow *win, uiBlock *block)
void uiItemS_ex(uiLayout *layout, float factor, LayoutSeparatorType type=LayoutSeparatorType::Auto)
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
void UI_menutype_draw(bContext *C, MenuType *mt, uiLayout *layout)
void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2)
void UI_but_drawflag_disable(uiBut *but, int flag)
@ UI_BLOCK_THEME_STYLE_POPUP
uiBut * uiDefButImage(uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4])
void UI_block_bounds_set_centered(uiBlock *block, int addval)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void UI_block_flag_enable(uiBlock *block, int flag)
uiBut * uiItemL_ex(uiLayout *layout, const char *name, int icon, bool highlight, bool redalert)
ImBuf * UI_svg_icon_bitmap(uint icon_id, float size, bool multicolor=false)
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
struct ImBuf * IMB_ibImageFromMemory(const unsigned char *, size_t, int, char[IM_MAX_SPACE], const char *)
#define unit_float_to_uchar_clamp(val)
float distance(float a, float b)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
ImBufByteBuffer byte_buffer
uiWidgetColors wcol_menu_back
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
bool WM_operator_winactive(bContext *C)
void WM_OT_splash_about(wmOperatorType *ot)
static ImBuf * wm_block_splash_image(int width, int *r_height)
static void wm_block_splash_add_label(uiBlock *block, const char *label, int x, int y)
static void wm_block_splash_close(bContext *C, void *arg_block, void *)
static uiBlock * wm_block_about_create(bContext *C, ARegion *region, void *)
static void wm_block_splash_image_roundcorners_add(ImBuf *ibuf)
static void wm_block_splash_close_on_fileselect(bContext *C, void *arg1, void *)
static uiBlock * wm_block_splash_create(bContext *C, ARegion *region, void *)
static int wm_splash_about_invoke(bContext *C, wmOperator *, const wmEvent *)
static int wm_splash_invoke(bContext *C, wmOperator *, const wmEvent *)
void WM_OT_splash(wmOperatorType *ot)