26#include <fmt/format.h>
74#include "RNA_prototypes.hh"
91#define TIP_SPACER 0.3f
92#define TIP_PADDING_X 1.95f
93#define TIP_PADDING_Y 1.28f
95#define TIP_MAXWIDTH 600
140 field.
text = std::move(text);
142 data.fields.append(std::move(field));
149 field.
image = image_data;
151 data.fields.append(std::move(field));
161 dest[0] = (1.0f - fac) * dest[0] + (fac * source[0]);
162 dest[1] = (1.0f - fac) * dest[1] + (fac * source[1]);
163 dest[2] = (1.0f - fac) * dest[2] + (fac * source[2]);
175 uchar drawcol[4] = {0, 0, 0, 255};
185 float background_color[3];
227 bbox.
xmin += 0.5f * pad_x;
228 bbox.
ymax -= 0.5f * pad_y;
231 for (
int i = 0; i <
data->fields.size(); i++) {
244 &
data->fstyle, &bbox, field->
text.c_str(), field->
text.size(), drawcol, &fs_params);
248 const float xofs = field->
geom.x_pos;
249 const float yofs =
data->lineh * (field->
geom.lines - 1);
278 &fstyle_mono, &bbox, field->
text.c_str(), field->
text.size(), drawcol, &fs_params);
288 float(bbox.
ymax + field->
image->height));
293 const float color1[4] = {checker_dark, checker_dark, checker_dark, 1.0f};
294 const float color2[4] = {checker_light, checker_light, checker_light, 1.0f};
296 float(bbox.
ymax +
U.pixelsize),
309 field->
image->ibuf->x,
310 field->
image->ibuf->y,
311 gpu::TextureFormat::UNORM_8_8_8_8,
313 field->
image->ibuf->byte_data(),
314 float(field->
image->width) /
float(field->
image->ibuf->x),
315 float(field->
image->height) /
float(field->
image->ibuf->y),
316 (field->
image->text_color) ? main_color :
nullptr);
318 if (field->
image->border) {
323 float border_color[4] = {1.0f, 1.0f, 1.0f, 0.15f};
327 border_color[0] = 0.0f;
328 border_color[1] = 0.0f;
329 border_color[2] = 0.0f;
336 float(bbox.
ymax + field->
image->height));
354 &
data->fstyle, &bbox, field->
text.c_str(), field->
text.size(), drawcol, &fs_params);
400 const int fields_len_init =
data.fields.size();
418 fmt::format(fmt::runtime(
TIP_(
"Shortcut: {}")), kmi_str),
427 fmt::format(fmt::runtime(
TIP_(
"Python: {}")),
str),
434 return (fields_len_init !=
data.fields.size());
457 return fmt::format(
"{}{}", tip,
".");
467 if (but->
optype ==
nullptr) {
472 if (but->
opptr ==
nullptr) {
493 bool has_valid_context =
true;
494 const char *has_valid_context_error =
IFACE_(
"Unsupported context");
497 if (area ==
nullptr) {
498 has_valid_context =
false;
504 if (space_type_prop != area->
spacetype) {
505 has_valid_context =
false;
512 std::unique_ptr<TooltipData>
data = std::make_unique<TooltipData>();
520 const char *expr_imports[] = {
"bpy",
"bl_ui",
nullptr};
523 "bl_ui.space_toolsystem_common.item_from_id("
525 "bpy.context.space_data.type, "
528 char *expr_result =
nullptr;
529 bool is_error =
false;
531 if (has_valid_context ==
false) {
532 expr_result =
BLI_strdup(has_valid_context_error);
535 if (
STREQ(expr_result,
"")) {
536 MEM_delete(expr_result);
537 expr_result =
nullptr;
547 if (expr_result !=
nullptr) {
551 if (label_str == expr_result) {
552 label_str =
TIP_(expr_result);
555 if (label_str != expr_result) {
556 MEM_delete(expr_result);
566 MEM_delete(expr_result);
571 if (is_quick_tip ==
false) {
572 const char *expr_imports[] = {
"bpy",
"bl_ui",
nullptr};
575 "bl_ui.space_toolsystem_common.description_from_id("
577 "bpy.context.space_data.type, "
581 char *expr_result =
nullptr;
582 bool is_error =
false;
584 if (has_valid_context ==
false) {
585 expr_result =
BLI_strdup(has_valid_context_error);
588 if (
STREQ(expr_result,
"")) {
589 MEM_delete(expr_result);
590 expr_result =
nullptr;
600 if (expr_result !=
nullptr) {
604 MEM_delete(expr_result);
609 const bool show_shortcut = is_quick_tip ==
false &&
623 if (shortcut.empty()) {
627 if (shortcut_toolbar) {
630 const char *expr_imports[] = {
631 "bpy",
"bl_keymap_utils",
"bl_keymap_utils.keymap_from_toolbar",
nullptr};
634 "bl_keymap_utils.keymap_from_toolbar.generate("
636 "bpy.context.space_data.type), "
637 "'as_pointer', lambda: 0)()");
641 if (has_valid_context ==
false) {
642 shortcut = has_valid_context_error;
645 if (expr_result != 0) {
651 if (
STREQ(tool_id, tool_id_test)) {
653 shortcut = fmt::format(
"{}, {}", *shortcut_toolbar, kmi_str);
666 if (!shortcut.empty()) {
668 fmt::format(fmt::runtime(
TIP_(
"Shortcut: {}")), shortcut),
688 char *expr_result =
nullptr;
689 size_t expr_result_len;
692 const char *expr_imports[] = {
"bpy",
"bl_ui",
nullptr};
696 "item.idname for item in bl_ui.space_toolsystem_common.item_group_from_id("
698 "bpy.context.space_data.type, '%s', coerce=True) "
699 "if item is not None)",
702 if (has_valid_context ==
false) {
706 C, expr_imports, expr,
nullptr, &expr_result, &expr_result_len))
712 if (expr_result !=
nullptr) {
716 std::optional<std::string> shortcut;
718 const char *item_end = expr_result + expr_result_len;
719 const char *item_step = expr_result;
721 while (item_step < item_end) {
731 item_step += strlen(item_step) + 1;
735 MEM_delete(expr_result);
739 fmt::format(fmt::runtime(
TIP_(
"Shortcut Cycle: {}")), *shortcut),
755 std::optional<std::string> shortcut;
769 fmt::format(fmt::runtime(
TIP_(
"Shortcut Hold: {}")), *shortcut),
781 fmt::format(fmt::runtime(
TIP_(
"Python: {}")),
str),
792 const char *expr_imports[] = {
"bpy",
"bl_ui",
nullptr};
796 "bl_ui.space_toolsystem_common.keymap_from_id("
798 "bpy.context.space_data.type, "
800 "'as_pointer', lambda: 0)()",
805 if (has_valid_context ==
false) {
809 if (expr_result != 0) {
813 tooltip_data_append_from_keymap(
C, *
data, keymap);
821 UNUSED_VARS(is_quick_tip, has_valid_context, has_valid_context_error);
829 const int max_title_len,
830 const bool show_alpha,
831 const bool show_hex =
false)
833 const int align = max_title_len - title.
size();
839 return fmt::format(
"{}:{: <{}} #{:02X}{:02X}{:02X}{:02X}",
849 "{}:{: <{}} #{:02X}{:02X}{:02X}", title,
"", align,
int(hex[0]),
int(hex[1]),
int(hex[2]));
853 return fmt::format(
"{}:{: <{}} {:.3f}", title,
"", align,
color[3]);
857 "{}:{: <{}} {:.3f} {:.3f} {:.3f}", title,
"", align,
color[0],
color[1],
color[2]);
861 const float4 &original_color,
862 const bool has_alpha,
867 float4 scene_linear_color = original_color;
868 float4 display_color = original_color;
869 float4 srgb_color = original_color;
882 hsv[3] = srgb_color[3];
888 const int max_title_len = std::max(
889 {hex_title.
size(), rgb_title.
size(), hsv_title.
size(), alpha_title.
size()});
892 srgb_color, hex_title, max_title_len, has_alpha,
true);
893 const std::string rgba_st =
tooltip_color_string(display_color, rgb_title, max_title_len,
false);
896 scene_linear_color, alpha_title, max_title_len,
true);
904 image_data.
width = int(
w);
905 image_data.
height = int(
w / (has_alpha ? 4.0f : 3.0f));
910 if (scene_linear_color[3] == 1.0f) {
914 image_data.
ibuf, scene_linear_color, 1, 1, image_data.
width, image_data.
height);
921 image_data.
width / 2,
926 scene_linear_color[3] = 1.0f;
928 image_data.
ibuf, scene_linear_color, 1, 1, image_data.
width / 2, image_data.
height);
957 if (optype && !rnaprop) {
969 fmt::format(fmt::runtime(
TIP_(
"Python: {}")),
str),
976 if (!optype && !rna_struct.empty()) {
981 fmt::format(fmt::runtime(
TIP_(
"Python: {}")), rna_struct) :
982 fmt::format(fmt::runtime(
TIP_(
"Python: {}.{}")), rna_struct, rna_prop),
986 (
data.fields.size() > 0));
1000 const char *identifier =
nullptr;
1007 if (
ELEM(but.
icon, ICON_NONE, ICON_BLANK1)) {
1021 fmt::format(
"Icon: {}", icon_name),
1025 !
data.fields.is_empty());
1037 std::unique_ptr<TooltipData>
data = std::make_unique<TooltipData>();
1042 std::string but_label;
1043 std::string but_tip;
1044 std::string but_tip_label;
1045 std::string op_keymap;
1046 std::string prop_keymap;
1047 std::string rna_struct;
1048 std::string rna_prop;
1049 std::string enum_label;
1050 std::string enum_tip;
1069 enum_label = enum_item ? enum_item->name :
"";
1075 enum_label = enum_item ? enum_item->name :
"";
1076 const char *description_c = enum_item ? enum_item->description :
nullptr;
1077 enum_tip = description_c ? description_c :
"";
1089 if (!but_tip_label.empty()) {
1091 if (!is_quick_tip) {
1101 if (!enum_label.empty()) {
1112 if (!but_tip.empty()) {
1113 if (!enum_label.empty() && enum_label == but_label) {
1121 if (but_label.empty()) {
1129 TIP_(
"(Shift-Click/Drag to select multiple)"),
1136 else if (!enum_label.empty() && but_label.empty()) {
1146 if (!enum_tip.empty()) {
1149 std::move(enum_tip),
1153 !enum_label.empty() && but_label.empty());
1157 if (!op_keymap.empty()) {
1159 fmt::format(fmt::runtime(
TIP_(
"Shortcut: {}")), op_keymap),
1163 !
data->fields.is_empty());
1167 if (!prop_keymap.empty()) {
1169 fmt::format(fmt::runtime(
TIP_(
"Shortcut: {}")), prop_keymap),
1183 fmt::format(fmt::runtime(
TIP_(
"Value: {}")), buf),
1201 const std::optional<blender::bke::path_templates::VariableMap> variables =
1206 filepath,
sizeof(filepath), *variables);
1224 fmt::format(fmt::runtime(
TIP_(
"Radians: {}")), value),
1235 fmt::format(fmt::runtime(
TIP_(
"Expression: {}")), buf),
1249 const StringRef lib_path =
id->lib->filepath;
1271 TIP_(
"Warning: the blend-file relative path prefix \"//\" "
1272 "is not supported for this property."),
1289 const std::optional<bke::path_templates::VariableMap> variables =
1297 std::string error_message(
"Path template error(s):");
1312 const char *disabled_msg_orig =
nullptr;
1313 const char *disabled_msg =
nullptr;
1314 bool disabled_msg_free =
false;
1321 call_params.
optype = optype;
1326 disabled_msg =
TIP_(disabled_msg_orig);
1333 if (disabled_msg && disabled_msg[0]) {
1337 if (disabled_msg_free) {
1338 MEM_delete(disabled_msg_orig);
1348 bool has_alpha =
false;
1372 data->fields.pop_last();
1380 std::unique_ptr<TooltipData>
data = std::make_unique<TooltipData>();
1387 struct GizmoOpActions {
1391 GizmoOpActions gzop_actions[] = {
1402 for (
int i = 0; i <
ARRAY_SIZE(gzop_actions); i++) {
1406 if (gzop !=
nullptr) {
1410 if (!info.empty()) {
1413 gzop_actions[i].prefix ? fmt::format(
"{}: {}", gzop_actions[i].prefix, info) : info,
1427 fmt::format(fmt::runtime(
TIP_(
"Shortcut: {}")), *shortcut_str),
1440 if (gz_prop.
prop !=
nullptr) {
1442 if (info && info[0]) {
1454 std::unique_ptr<TooltipData>
data = std::make_unique<TooltipData>();
1463 std::unique_ptr<TooltipData> data_uptr,
1464 const float init_position[2],
1465 const rcti *init_rect_overlap)
1507 int i, fonth, fontw;
1508 for (i = 0, fontw = 0, fonth = 0; i <
data->fields.size(); i++) {
1520 font_id =
data->fstyle.uifont_id;
1523 if (!field->
text.empty()) {
1535 fonth += h * info.
lines;
1542 fonth += field->
image->height;
1549 field->
geom.x_pos = x_pos;
1561 rect_fl.
xmin = init_position[0] - (h * 0.2f) - (pad_x * 0.5f);
1562 rect_fl.
xmax = rect_fl.
xmin + fontw;
1563 rect_fl.
ymax = init_position[1] - (h * 0.2f) - (pad_y * 0.5f);
1564 rect_fl.
ymin = rect_fl.
ymax - fonth;
1574 if (init_rect_overlap !=
nullptr) {
1575 const int pad =
max_ff(1.0f,
U.pixelsize) * 5;
1582 rect_clamp.
xmin = pad_x +
pad;
1583 rect_clamp.
xmax = win_size[0] - pad_x -
pad;
1584 rect_clamp.
ymin = pad_y +
pad;
1585 rect_clamp.
ymax = win_size[1] - pad_y -
pad;
1590#ifdef USE_ALIGN_Y_CENTER
1604#ifdef USE_ALIGN_Y_CENTER
1605 r.
ymin = cent_overlap_y - (size_y / 2);
1619#ifdef USE_ALIGN_Y_CENTER
1620 r.
ymin = cent_overlap_y - (size_y / 2);
1632 r.
xmin = cent_overlap_x - (size_x / 2);
1640 r.
xmin = cent_overlap_x - (size_x / 2);
1648 for (
int j = 0; j < 4; j++) {
1649 const rcti *r = (&rect.xpos) + j;
1658 int offset_dummy[2];
1664 const int clamp_pad_x = int((5.0f *
UI_SCALE_FAC) + (pad_x * 0.5f));
1665 const int clamp_pad_y = int((7.0f *
UI_SCALE_FAC) + (pad_y * 0.5f));
1667 rect_clamp.
xmin = clamp_pad_x;
1668 rect_clamp.
xmax = win_size[0] - clamp_pad_x;
1669 rect_clamp.
ymin = clamp_pad_y;
1670 rect_clamp.
ymax = win_size[1] - clamp_pad_y;
1671 int offset_dummy[2];
1676#undef USE_ALIGN_Y_CENTER
1679 rect_i.
ymin < (win_size[1] / 4))
1684 else if (init_position[1] <
UI_UNIT_Y) {
1696 if (init_rect_overlap !=
nullptr) {
1700 data->bbox.xmin = margin;
1702 data->bbox.ymin = margin;
1731 float init_position[2];
1736 std::unique_ptr<TooltipData>
data =
nullptr;
1742 if (
data ==
nullptr) {
1746 if (
data ==
nullptr) {
1750 if (
data ==
nullptr) {
1754 if (
data ==
nullptr) {
1760 if (is_no_overlap) {
1761 rctf overlap_rect_fl;
1769 overlap_rect_fl = but->
rect;
1788 C, std::move(
data), init_position, is_no_overlap ? &init_rect :
nullptr);
1808 if (
data ==
nullptr) {
1817 init_position[0] =
bounds.xmin;
1818 init_position[1] =
bounds.ymin;
1827 const float init_position[2])
1829 std::unique_ptr<TooltipData>
data = std::make_unique<TooltipData>();
1831 if (
data->fields.is_empty()) {
1839 if (ima.filepath[0]) {
1845 std::string image_type;
1846 switch (ima.source) {
1848 image_type =
TIP_(
"Single Image");
1851 image_type =
TIP_(
"Image Sequence");
1854 image_type =
TIP_(
"Movie");
1857 image_type =
TIP_(
"Generated");
1860 image_type =
TIP_(
"Viewer");
1863 image_type =
TIP_(
"UDIM Tiles");
1882 fmt::format(fmt::runtime(
TIP_(
"Frames: {}")), duration),
1892 fmt::format(fmt::runtime(
TIP_(
"Users: {}")), ima.id.us),
1899 image_data.
width = ibuf->
x;
1901 image_data.
ibuf = ibuf;
1902 image_data.
border =
true;
1920 std::string image_type;
1923 image_type =
TIP_(
"Image Sequence");
1926 image_type =
TIP_(
"Movie");
1957 image_data.
width = ibuf->x;
1958 image_data.
height = ibuf->y;
1959 image_data.
ibuf = ibuf;
1960 image_data.
border =
true;
1998 image_data.
width = ibuf->
x;
2000 image_data.
ibuf = ibuf;
2001 image_data.
border =
false;
2012 std::unique_ptr<TooltipData>
data = std::make_unique<TooltipData>();
2017 if (type_id ==
ID_IM) {
2020 else if (type_id ==
ID_MC) {
2023 else if (type_id ==
ID_VF) {
2029 fmt::format(fmt::runtime(
TIP_(
"Choose {} data-block to be assigned to this user")),
2039 fmt::format(fmt::runtime(
TIP_(
"Source library: {}\n{}")),
2040 id->lib->id.name + 2,
2051 const ARegion *searchbox_region,
2052 const rcti *item_rect,
2056 if (
data ==
nullptr) {
2061 float init_position[2];
Functions and classes for evaluating template expressions in filepaths.
#define BLF_DRAW_STR_DUMMY_MAX
File and directory operations.
#define SNPRINTF_UTF8(dst, format,...)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define CTX_TIP_(context, msgid)
#define ID_IS_LINKED(_id)
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
Read Blender memory allocation and freeing.
#define UI_ALPHA_CHECKER_LIGHT
#define UI_ALPHA_CHECKER_DARK
int pad[32 - sizeof(int)]
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void draw(float x, float y, int img_w, int img_h, gpu::TextureFormat gpu_format, bool use_filter, const void *rect, float scale_x, float scale_y, const float color[4])
constexpr const char * c_str() const
constexpr bool startswith(StringRef prefix) const
static constexpr int64_t not_found
constexpr bool is_empty() const
constexpr int64_t size() const
constexpr int64_t find(char c, int64_t pos=0) const
constexpr StringRef substr(int64_t start, int64_t size) const
constexpr const char * data() const
float3x3 scale(float3x3 mat, float2 scale)
StringRefNull essentials_directory_path()
void get_color_4fv(int colorid, float col[4])
static void tooltip_region_free_cb(ARegion *region)
bool button_context_poll_operator_ex(bContext *C, const Button *but, const wmOperatorCallParams *optype_params)
static std::string tooltip_text_python_from_op(bContext *C, wmOperatorType *ot, PointerRNA *opptr)
void tooltip_color_field_add(TooltipData &data, const float4 &color, bool has_alpha, bool is_gamma, const ColorManagedDisplay *display, TooltipColorID color_id)
std::string button_extra_icon_string_get_tooltip(bContext &C, const ButtonExtraOpIcon &extra_icon)
std::string button_string_get_tooltip(bContext &C, Button &but)
int button_unit_type_get(const Button *but)
static std::unique_ptr< TooltipData > tooltip_data_from_custom_func(bContext *C, Button *but)
ARegion * tooltip_create_from_button_or_extra_icon(bContext *C, ARegion *butregion, Button *but, ButtonExtraOpIcon *extra_icon, bool is_quick_tip)
BLI_STATIC_ASSERT(int(TIP_LC_MAX)==int(TIP_LC_ALERT)+1, "invalid lc-max")
void draw_tooltip_background(const uiStyle *style, Block *block, const rcti *rect)
wmOperatorType * button_extra_operator_icon_optype_get(const ButtonExtraOpIcon *extra_icon)
void button_string_get(Button *but, char *str, const size_t str_maxncpy)
static ARegion * tooltip_create_with_data(bContext *C, std::unique_ptr< TooltipData > data_uptr, const float init_position[2], const rcti *init_rect_overlap)
static void tooltip_region_draw_cb(const bContext *, ARegion *region)
const uiStyle * style_get()
static void tooltip_from_clip(MovieClip &clip, TooltipData &data)
static std::unique_ptr< TooltipData > tooltip_data_from_search_item_tooltip_data(ID *id)
bool but_has_quick_tooltip(const Button *but)
std::string button_string_get_rna_property_identifier(const Button &but)
PointerRNA * button_operator_ptr_ensure(Button *but)
void region_temp_remove(bContext *C, bScreen *screen, ARegion *region)
void tooltip_free(bContext *C, bScreen *screen, ARegion *region)
void block_to_window_fl(const ARegion *region, const Block *block, float *x, float *y)
void fontstyle_set(const uiFontStyle *fs)
std::optional< EnumPropertyItem > button_rna_enum_item_get(bContext &C, Button &but)
std::string button_string_get_tooltip_label(const Button &but)
const ColorManagedDisplay * button_cm_display_get(Button &but)
bool block_is_menu(const Block *block) ATTR_WARN_UNUSED_RESULT
static void color_blend_f3_f3(float dest[3], const float source[3], const float fac)
void tooltip_uibut_python_add(TooltipData &data, bContext &C, Button &but, ButtonExtraOpIcon *extra_icon)
@ BLOCK_SHOW_SHORTCUT_ALWAYS
void fontstyle_draw(const uiFontStyle *fs, const rcti *rect, const char *str, size_t str_len, const uchar col[4], const FontStyleDrawParams *fs_params)
ARegion * region_temp_add(bScreen *screen)
bool button_anim_expression_get(Button *but, char *str, size_t str_maxncpy)
static void tooltip_uibut_icon_add(TooltipData &data, Button &but)
static std::unique_ptr< TooltipData > tooltip_data_from_gizmo(bContext *C, wmGizmo *gz)
std::string button_string_get_label(Button &but)
void tooltip_image_field_add(TooltipData &data, const TooltipImage &image_data)
ARegion * tooltip_create_from_func(bContext *C, FunctionRef< void(TooltipData &data)> create_fn, const float init_position[2])
static std::unique_ptr< TooltipData > tooltip_data_from_tool(bContext *C, Button *but, bool is_quick_tip)
void button_v3_get(Button *but, float vec[3])
void block_to_window_rctf(const ARegion *region, const Block *block, rctf *rct_dst, const rctf *rct_src)
std::string button_string_get_rna_struct_identifier(const Button &but)
std::string button_string_get_operator_keymap(bContext &C, Button &but)
const uiWidgetColors * tooltip_get_theme()
void tooltip_text_field_add(TooltipData &data, std::string text, std::string suffix, const TooltipStyle style, const TooltipColorID color_id, const bool is_pad=false)
static std::string tooltip_color_string(const float4 &color, const StringRefNull title, const int max_title_len, const bool show_alpha, const bool show_hex=false)
PointerRNA * button_extra_operator_icon_opptr_get(const ButtonExtraOpIcon *extra_icon)
std::string button_extra_icon_string_get_label(const ButtonExtraOpIcon &extra_icon)
bool block_is_pie_menu(const Block *block) ATTR_WARN_UNUSED_RESULT
static std::string tooltip_with_period(StringRef tip)
static void tooltip_from_image(Image &ima, TooltipData &data)
static void tooltip_from_vfont(const VFont &font, TooltipData &data)
std::string button_extra_icon_string_get_operator_keymap(const bContext &C, const ButtonExtraOpIcon &extra_icon)
bool button_is_color_gamma(Button &but)
std::string button_string_get_property_keymap(bContext &C, Button &but)
static const char * icon_id_to_name(BIFIconID icon_value)
ARegion * tooltip_create_from_search_item_generic(bContext *C, const ARegion *searchbox_region, const rcti *item_rect, ID *id)
ARegion * tooltip_create_from_gizmo(bContext *C, wmGizmo *gz)
ARegion * tooltip_create_from_button(bContext *C, ARegion *butregion, Button *but, bool is_quick_tip)
static std::unique_ptr< TooltipData > tooltip_data_from_button_or_extra_icon(bContext *C, Button *but, ButtonExtraOpIcon *extra_icon, const bool is_quick_tip)
bool but_is_tool(const Button *but)
const char * BKE_idtype_idcode_to_name(short idcode)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
std::string WM_operator_pystring_abbreviate(std::string str, int str_len_max)
ScrArea * CTX_wm_area(const bContext *C)
void wmOrtho2_region_pixelspace(const ARegion *region)
MINLINE void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
char * STRNCPY(char(&dst)[N], const char *src)
ImBuf * IMB_font_preview(const char *filepath, unsigned int width, const float color[4], const char *sample_text=nullptr)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
float BLF_width(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void WM_operator_properties_sanitize(PointerRNA *ptr, const bool no_context)
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
bool BKE_vfont_is_builtin(const VFont *vfont)
int MOV_get_image_height(const MovieReader *anim)
unsigned int BLI_str_utf8_as_unicode_safe(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int MOV_get_image_width(const MovieReader *anim)
std::optional< std::string > RNA_path_full_struct_py(const PointerRNA *ptr)
void WM_operator_properties_free(PointerRNA *ptr)
bool BLI_str_utf32_char_is_terminal_punctuation(char32_t codepoint)
void BLF_wordwrap(int fontid, int wrap_width, BLFWrapMode mode=BLFWrapMode::Minimal)
void imm_draw_box_checker_2d(float x1, float y1, float x2, float y2, bool clear_alpha=false)
bool bool bool BPY_run_string_as_string_and_len(bContext *C, const char *imports[], const char *expr, BPy_RunErrInfo *err_info, char **r_value, size_t *r_value_len) ATTR_NONNULL(1
bool BKE_path_contains_template_syntax(StringRef path)
GPUVertFormat * immVertexFormat()
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
bool BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
void BLI_rcti_rctf_copy(struct rcti *dst, const struct rctf *src)
void rgb_to_hsv_v(const float rgb[3], float r_hsv[3])
PointerRNA WM_operator_properties_create_ptr(wmOperatorType *ot)
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
wmWindow * CTX_wm_window(const bContext *C)
void imm_draw_box_checker_2d_ex(float x1, float y1, float x2, float y2, const float color_primary[4], const float color_secondary[4], int checker_size)
MINLINE int max_ii(int a, int b)
std::optional< std::string > WM_key_event_operator_string(const bContext *C, const char *opname, wm::OpCallContext opcontext, IDProperty *properties, const bool is_strict)
void immUniformColor4fv(const float rgba[4])
void BLI_rcti_rctf_copy_round(struct rcti *dst, const struct rctf *src)
MINLINE void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
bool BLI_rcti_clamp(struct rcti *rect, const struct rcti *rect_bounds, int r_xy[2])
void ED_region_tag_redraw(ARegion *region)
std::string WM_operatortype_description_or_name(bContext *C, wmOperatorType *ot, PointerRNA *properties)
void IMB_rectfill_area(ImBuf *ibuf, const float scene_linear_color[4], int x1, int y1, int x2, int y2)
MINLINE float srgb_to_grayscale(const float rgb[3])
void BLF_disable(int fontid, FontFlags flag)
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
@ GPU_BLEND_ALPHA_PREMULT
std::string BKE_path_template_error_to_string(const bke::path_templates::Error &error, StringRef path)
bool RNA_property_array_check(PropertyRNA *prop)
VecBase< float, 4 > float4
void immBindBuiltinProgram(GPUBuiltinShader shader_id)
PropertyType RNA_property_type(PropertyRNA *prop)
Vector< bke::path_templates::Error > BKE_path_apply_template(char *path, int path_maxncpy, const bke::path_templates::VariableMap &template_variables)
std::string WM_operator_pystring_ex(bContext *C, wmOperator *op, const bool all_args, const bool macro_args, wmOperatorType *ot, PointerRNA *opptr)
void BLF_size(int fontid, float size)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
void void BLI_path_split_dir_part(const char *filepath, char *dir, size_t dir_maxncpy) ATTR_NONNULL(1
void IMB_freeImBuf(ImBuf *ibuf)
VecBase< int32_t, 2 > int2
BLI_INLINE int BLI_rcti_cent_y(const struct rcti *rct)
BMesh const char void * data
@ GPU_SHADER_3D_IMAGE_COLOR
@ GPU_SHADER_3D_UNIFORM_COLOR
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
BLI_INLINE void IMB_colormanagement_srgb_to_scene_linear_v3(float scene_linear[3], const float srgb[3])
std::optional< bke::path_templates::VariableMap > BKE_build_template_variables_for_prop(const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void BLI_rcti_translate(struct rcti *rect, int x, int y)
int RNA_property_flag(PropertyRNA *prop)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
bool BKE_image_has_anim(Image *image)
const char * CTX_wm_operator_poll_msg_get(bContext *C, bool *r_free)
void ED_region_floating_init(ARegion *region)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool bool BPY_run_string_as_intptr(bContext *C, const char *imports[], const char *expr, BPy_RunErrInfo *err_info, intptr_t *r_value) ATTR_NONNULL(1
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, ImBufFlags flags)
std::optional< std::string > WM_keymap_item_to_string(const wmKeyMapItem *kmi, const bool compact)
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
SpaceLink * CTX_wm_space_data(const bContext *C)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
int BLF_height_max(int fontid) ATTR_WARN_UNUSED_RESULT
void IMB_colormanagement_scene_linear_to_display_v3(float pixel[3], const ColorManagedDisplay *display, ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW)
const char * BLI_str_find_prev_char_utf8(const char *p, const char *str_start) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
void IMB_byte_from_float(ImBuf *ibuf)
void imm_draw_box_wire_2d(uint pos, float x1, float y1, float x2, float y2)
int2 WM_window_native_pixel_size(const wmWindow *win)
bool BLI_path_is_rel(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
const char * RNA_property_ui_description(const PropertyRNA *prop, const PointerRNA *ptr)
MINLINE float max_ff(float a, float b)
bool BLI_path_contains(const char *container_path, const char *containee_path) ATTR_NONNULL(1
std::optional< std::string > RNA_path_full_property_py_ex(const PointerRNA *ptr, PropertyRNA *prop, int index, bool use_fallback)
Vector< bke::path_templates::Error > BKE_path_validate_template(StringRef path, const bke::path_templates::VariableMap &template_variables)
int BLF_descender(int fontid) ATTR_WARN_UNUSED_RESULT
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
ID_Type GS(const char *name)
@ PROP_PATH_SUPPORTS_TEMPLATES
@ PROP_PATH_SUPPORTS_BLEND_RELATIVE
MINLINE void rgb_uchar_to_float(float r_col[3], const unsigned char col_ub[3])
bScreen * CTX_wm_screen(const bContext *C)
void GPU_blend(GPUBlend blend)
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
bool RNA_enum_identifier(const EnumPropertyItem *item, const int value, const char **r_identifier)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
void BLI_rcti_pad(struct rcti *rect, int pad_x, int pad_y)
@ DISPLAY_SPACE_COLOR_INSPECTION
ImBuf * MOV_decode_preview_frame(MovieReader *anim)
BLI_INLINE void IMB_colormanagement_scene_linear_to_srgb_v3(float srgb[3], const float scene_linear[3])
BLI_INLINE int BLI_rcti_cent_x(const struct rcti *rct)
wmGizmoOpElem * WM_gizmo_operator_get(wmGizmo *gz, int part_index)
bool IMB_scale(ImBuf *ibuf, int2 new_size, IMBScaleFilter filter, bool threaded=true)
const EnumPropertyItem rna_enum_icon_items[]
int MOV_get_duration_frames(const MovieReader *anim)
bool BLI_rcti_inside_rcti(const rcti *rct_a, const rcti *rct_b)
MINLINE int min_ii(int a, int b)
void CTX_wm_operator_poll_msg_clear(bContext *C)
ImBuf * BKE_image_preview(Image *ima, short max_size, short *r_width, short *r_height)
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void BLF_enable(int fontid, FontFlags flag)
MINLINE void rgba_float_to_uchar(unsigned char r_col[4], const float col_f[4])
ocio::Display ColorManagedDisplay
bool bool bool bool BPY_run_string_as_string(bContext *C, const char *imports[], const char *expr, BPy_RunErrInfo *err_info, char **r_value) ATTR_NONNULL(1
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
void(*) draw(const bContext *C, ARegion *region)
bke::ARegionRuntime * runtime
struct MovieReader * anim
struct ARegionType * type
wmGizmoFnScreenBoundsGet screen_bounds_get
Vector< wmGizmoProperty, 0 > target_properties
ListBaseT< wmKeyMapItem > items
wm::OpCallContext opcontext
bke::WindowRuntime * runtime