66 if (icon && name && name[0] ==
'\0') {
192 if (icon && name && name[0] ==
'\0') {
249 if (icon && name && name[0] ==
'\0') {
316 if (icon == ICON_DOT) {
345 block,
UI_BTYPE_LABEL, 0, text,
x,
y,
width,
height,
nullptr, 0, 0, 0, 0,
nullptr);
371 const int item_width = tot_width /
len;
374 for (
int i = 0; i <
len; i++) {
400 if (check_prop && check_prop(
ptr, prop,
user_data) == 0) {
406 switch (label_align) {
437 const bool use_activate_init = ((prop == prop_activate_init) &&
440 if (use_activate_init) {
447 if (use_activate_init) {
475 const bool requires_exact_data_name,
476 const bool has_id_icon,
484 if (!has_id_icon && cis->
is_id && !requires_exact_data_name) {
491 strcpy(cis->
name, name_buf);
507 ListBase *items_list = MEM_cnew<ListBase>(
"items_list");
512 const bool requires_exact_data_name = !is_ptr_target;
513 const bool skip_filter = is_first;
516 bool has_id_icon =
false;
520 if (
data->search_prop !=
nullptr) {
526 if (itemptr.data ==
data->target_ptr.owner_id) {
549 if (requires_exact_data_name) {
553 const ID *
id =
static_cast<ID *
>(itemptr.data);
556 "Name string buffer should be big enough to hold full UI ID name");
567 cis->
data = itemptr.data;
569 cis->
index = item_index;
578 if (
name != name_buf) {
593 struct SearchVisitUserData {
612 const bool show_extra_info = (G.debug_value == 102);
614 SearchVisitUserData *search_data = (struct SearchVisitUserData *)user_data;
615 CollItemSearch *cis = MEM_cnew<CollItemSearch>(search_data->func_id);
617 if (visit_params->info && show_extra_info) {
618 cis->name = BLI_sprintfN(
619 "%s" UI_SEP_CHAR_S
"%s", visit_params->text, visit_params->info);
622 cis->name = BLI_strdup(visit_params->text);
624 cis->index = search_data->item_index;
625 cis->iconid = ICON_NONE;
627 cis->name_prefix_offset = 0;
628 cis->has_sep_char = visit_params->
info !=
nullptr;
629 if (!search_data->skip_filter) {
630 BLI_string_search_add(search_data->search, visit_params->text, cis, 0);
633 search_data->item_index++;
662 for (
int i = 0; i < filtered_amount; i++) {
691 return ICON_EMPTY_DATA;
722 return ICON_CHECKMARK;
778 1e0, 1
e-1, 1
e-2, 1
e-3, 1
e-4, 1
e-5, 1
e-6};
779 static const double max_pow = 10000000.0;
789 if ((value < pow10_neg[prec]) && (value > (1.0 / max_pow))) {
790 int value_i = (int)((value * max_pow) + 0.5);
792 const int prec_span = 3;
797 while (i && value_i) {
807 test_prec = prec_min;
809 dec_flag = (dec_flag >> (prec_min + 1)) & ((1 << prec_span) - 1);
813 dec_flag = dec_flag >> 1;
816 if (test_prec > prec) {
887 bool changed =
false;
965 uiButStore *bs_handle = MEM_cnew<uiButStore>(__func__);
967 bs_handle->
block = block;
984 if (block != bs_handle->
block && bs_handle->
block !=
nullptr) {
985 block = bs_handle->
block;
997 return (bs->
block !=
nullptr);
1004 if (*bs_elem->but_p == but) {
1025 if (bs_elem->but_p ==
but_p) {
1040 if (*bs_elem->but_p == but_src) {
1041 *bs_elem->but_p = but_dst;
1053 bs_handle->block =
nullptr;
1055 *bs_elem->but_p =
nullptr;
1079 if (bs_handle->block == block->
oldblock) {
1080 bs_handle->block = block;
1083 if (*bs_elem->but_p) {
1089 *bs_elem->but_p = but_new;
void BKE_id_full_name_ui_prefix_get(char name[MAX_ID_FULL_NAME_UI], const struct ID *id, bool add_lib_hint, char separator_char, int *r_prefix_len)
#define MAX_ID_FULL_NAME_UI
#define BLI_STATIC_ASSERT(a, msg)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void void void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void void BLI_listbase_sort(struct ListBase *listbase, int(*cmp)(const void *, const void *)) ATTR_NONNULL(1
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_rctf_pad(struct rctf *rect, float pad_x, float pad_y)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
bool BLI_rctf_inside_rctf(const rctf *rct_a, const rctf *rct_b)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
int BLI_strcasecmp_natural(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
void BLI_string_search_add(StringSearch *search, const char *str, void *user_data, int weight)
void BLI_string_search_free(StringSearch *search)
StringSearch * BLI_string_search_new(void)
int BLI_string_search_query(StringSearch *search, const char *query, void ***r_data)
int rect_width(int rect[2][2])
int rect_height(int rect[2][2])
#define ID_IS_LINKED(_id)
Object is a sort of wrapper for general info.
void ED_region_tag_redraw_no_rebuild(struct ARegion *region)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
Read Guarded memory(de)allocation.
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 Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
#define RNA_STRUCT_BEGIN(sptr, prop)
#define RNA_PROP_BEGIN(sptr, itemptr, prop)
eStringPropertySearchFlag
@ PROP_STRING_SEARCH_SORT
@ PROP_STRING_SEARCH_SUPPORTED
@ UI_PROP_BUTS_ANY_FAILED_CHECK
@ UI_PROP_BUTS_NONE_ADDED
uiBut * uiDefIconTextButR_prop(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
uiBut * uiDefBut(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
void uiItemL(uiLayout *layout, const char *name, int icon)
uiBut * uiDefIconButR_prop(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
uiBut * UI_context_active_but_get(const struct bContext *C)
bool UI_search_item_add(uiSearchItems *items, const char *name, void *poin, int iconid, int but_flag, uint8_t name_prefix_offset)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
bool(* uiButIdentityCompareFunc)(const uiBut *a, const uiBut *b)
#define UI_PRECISION_FLOAT_MAX
@ UI_BUT_LABEL_ALIGN_SPLIT_COLUMN
@ UI_BUT_LABEL_ALIGN_NONE
@ UI_BUT_LABEL_ALIGN_COLUMN
uiBut * uiDefButR_prop(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
void UI_block_align_begin(uiBlock *block)
void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init)
void uiItemFullR(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, const char *name, int icon)
void UI_but_flag_enable(uiBut *but, int flag)
void UI_block_align_end(uiBlock *block)
int UI_icon_from_library(const struct ID *id)
void UI_view2d_region_to_view_rctf(const struct View2D *v2d, const struct rctf *rect_src, struct rctf *rect_dst) ATTR_NONNULL()
void UI_view2d_curRect_changed(const struct bContext *C, struct View2D *v2d)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
uiBut * ui_but_find_new(uiBlock *block_new, const uiBut *but_old)
void ui_block_to_region_rctf(const ARegion *region, uiBlock *block, rctf *rct_dst, const rctf *rct_src)
int ui_id_icon_get(const bContext *C, ID *id, const bool big)
uiBut * ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, bool results_are_suggestions)
int UI_text_colorid_from_report_type(int type)
int UI_icon_from_report_type(int type)
eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, bool(*check_prop)(PointerRNA *ptr, PropertyRNA *prop, void *user_data), void *user_data, PropertyRNA *prop_activate_init, const eButLabelAlign label_align, const bool compact)
bool UI_butstore_is_valid(uiButStore *bs)
int UI_icon_from_id(const ID *id)
int UI_icon_colorid_from_report_type(int type)
uiBut * uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int index, const char *name, int icon, int x, int y, int width, int height)
void UI_butstore_update(uiBlock *block)
void uiDefAutoButsArrayR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const int icon, const int x, const int y, const int tot_width, const int height)
static bool ui_view2d_cur_ensure_rect_in_view(View2D *v2d, const rctf *rect)
void UI_but_func_identity_compare_set(uiBut *but, uiButIdentityCompareFunc cmp_fn)
void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p)
bool UI_butstore_register_update(uiBlock *block, uiBut *but_dst, const uiBut *but_src)
static bool add_collection_search_item(CollItemSearch *cis, const bool requires_exact_data_name, const bool has_id_icon, uiSearchItems *items)
void ui_rna_collection_search_update_fn(const bContext *C, void *arg, const char *str, uiSearchItems *items, const bool is_first)
bool UI_butstore_is_registered(uiBlock *block, uiBut *but)
uiButStore * UI_butstore_create(uiBlock *block)
void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p)
void UI_butstore_clear(uiBlock *block)
static rctf ui_but_rect_to_view(const uiBut *but, const ARegion *region, const View2D *v2d)
bool UI_but_online_manual_id(const uiBut *but, char *r_str, size_t maxlength)
void UI_butstore_free(uiBlock *block, uiButStore *bs_handle)
void UI_but_ensure_in_view(const bContext *C, ARegion *region, const uiBut *but)
int UI_calc_float_precision(int prec, double value)
bool UI_but_online_manual_id_from_active(const bContext *C, char *r_str, size_t maxlength)
void(* MEM_freeN)(void *vmemh)
size_t(* MEM_allocN_len)(const void *vmemh)
ccl_device_inline float2 fabs(const float2 &a)
ccl_device_inline float3 pow(float3 v, float e)
const char * RNA_struct_identifier(const StructRNA *type)
void RNA_property_string_search(const bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *edit_text, StringPropertySearchVisitFunc visit_fn, void *visit_user_data)
bool RNA_property_array_check(PropertyRNA *prop)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
bool RNA_struct_is_ID(const StructRNA *type)
const char * RNA_property_identifier(const PropertyRNA *prop)
eStringPropertySearchFlag RNA_property_string_search_flag(PropertyRNA *prop)
char * RNA_struct_name_get_alloc(PointerRNA *ptr, char *fixedbuf, int fixedlen, int *r_len)
PropertyType RNA_property_type(PropertyRNA *prop)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value)
int RNA_property_flag(PropertyRNA *prop)
int RNA_struct_ui_icon(const StructRNA *type)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_property_ui_name(const PropertyRNA *prop)
struct CollItemSearch * next
struct CollItemSearch * prev
struct uiButStoreElem * prev
struct uiButStoreElem * next
uiButIdentityCompareFunc identity_cmp_func
struct wmOperatorType * optype
struct PropertyRNA * rnaprop
struct PointerRNA rnapoin
size_t WM_operator_py_idname(char *dst, const char *src)