37 #include "RNA_prototypes.h"
48 #define UI_PROP_DECORATE
51 #define UI_PROP_SEP_ICON_WIDTH_EXCEPTION
57 #define UI_OPERATOR_ERROR_RET(_ot, _opname, return_statement) \
59 ui_item_disabled(layout, _opname); \
60 RNA_warning("'%s' unknown operator", _opname); \
65 #define UI_ITEM_PROP_SEP_DIVIDE 0.4f
104 TEMPLATE_COLUMN_FLOW,
215 const int len = strlen(name);
218 memcpy(namestr, name,
len);
220 namestr[
len + 1] =
'\0';
228 int item,
int pos,
int all,
int available,
bool is_last,
int alignment,
float *extra_pixel)
235 if (
all > available) {
238 return available -
pos;
241 const float width = *extra_pixel + (item * available) / (
float)
all;
249 return available -
pos;
252 const float width = *extra_pixel + (item * available) / (
float)
all;
260 #define UI_ITEM_VARY_X 1
261 #define UI_ITEM_VARY_Y 2
330 if (
icon && !name[0]) {
331 return unit_x * (1.0f + pad_factor->
icon_only);
335 if (!
icon && !name[0]) {
336 return unit_x * (1.0f + pad_factor->
icon_only);
343 float margin = pad_factor->
text;
345 margin += pad_factor->
icon;
351 (int)
ceilf(unit_x * margin);
443 if (delta_xmin > 0) {
444 litem->
x += delta_xmin;
447 litem->
w += delta_xmax;
493 uiBut *but = arg_but;
503 for (
int i = 0; i <
len; i++) {
546 if (name[0] && show_text) {
547 uiDefBut(block,
UI_BTYPE_LABEL, 0, name, 0, 0,
w,
UI_UNIT_Y,
NULL, 0.0, 0.0, 0, 0,
"");
553 const int cols = (
len >= 20) ? 2 : 1;
554 const int colbuts =
len / (2 * cols);
556 uint layer_active = 0;
563 if (
ptr->
type == &RNA_Armature) {
580 for (
int b = 0;
b < cols;
b++) {
583 for (
int a = 0;
a < colbuts;
a++) {
584 const int layer_num =
a +
b * colbuts;
585 const uint layer_flag = (1u << layer_num);
587 if (layer_used & layer_flag) {
588 if (layer_active & layer_flag) {
589 icon = ICON_LAYER_ACTIVE;
592 icon = ICON_LAYER_USED;
600 block,
ptr, prop, layer_num,
"",
icon,
x + butw *
a,
y + buth, butw, buth);
605 for (
int a = 0;
a < colbuts;
a++) {
606 const int layer_num =
a +
len / 2 +
b * colbuts;
607 const uint layer_flag = (1u << layer_num);
609 if (layer_used & layer_flag) {
610 if (layer_active & layer_flag) {
611 icon = ICON_LAYER_ACTIVE;
614 icon = ICON_LAYER_USED;
622 block,
ptr, prop, layer_num,
"",
icon,
x + butw *
a,
y, butw, buth);
633 int totdim, dim_size[3];
647 for (
int a = 0;
a <
len;
a++) {
648 col =
a % dim_size[0];
649 row =
a / dim_size[0];
699 char str[3] = {
'\0'};
708 bool *boolarr =
NULL;
715 const char *str_buf = show_text ?
str :
"";
716 for (
int a = 0;
a <
len;
a++) {
721 icon = boolarr[
a] ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
762 if (!(current_value & enum_value)) {
763 current_value = enum_value;
766 current_value &= enum_value;
786 const char *name = (!uiname || uiname[0]) ? item->
name :
"";
788 const int value = item->
value;
794 block, but_type, 0,
icon, name, 0, 0, itemw, h,
ptr, prop, -1, 0, value, -1, -1,
NULL);
797 const int w = (is_first) ? itemw :
ceilf(itemw -
U.pixelsize);
799 block, but_type, 0,
icon, 0, 0,
w, h,
ptr, prop, -1, 0, value, -1, -1,
NULL);
803 block, but_type, 0, name, 0, 0, itemw, h,
ptr, prop, -1, 0, value, -1, -1,
NULL);
867 layout_radial = layout;
881 const bool is_first = item == item_array;
883 if (!item->identifier[0]) {
896 else if (radial && layout_radial) {
907 layout, block,
ptr, prop, uiname, h, but_type,
icon_only, item, is_first);
946 const bool use_custom_highlight = (prop_highlight !=
NULL);
948 if (use_custom_highlight) {
950 bool *highlight_array = alloca(
sizeof(
bool) * highlight_array_len);
954 (tab_but !=
NULL) && (i < highlight_array_len);
955 tab_but = tab_but->next, i++) {
998 int prop_but_width = w_hint;
999 #ifdef UI_PROP_DECORATE
1008 RNA_warning(
"Data is not a keymap item struct: %s. Ignoring 'full_event' option.",
1017 || use_prop_decorate
1028 #ifdef UI_PROP_DECORATE
1043 w_label = w_hint / 3;
1045 uiDefBut(block,
UI_BTYPE_LABEL, 0, name,
x,
y, w_label, h,
NULL, 0.0, 0.0, 0, 0,
"");
1060 subtype ==
PROP_DIRPATH ?
"BUTTONS_OT_directory_browse" :
1061 "BUTTONS_OT_file_browse",
1119 #ifdef UI_PROP_DECORATE
1121 if (use_prop_decorate) {
1122 uiItemL(layout_prop_decorate ? layout_prop_decorate : sub,
NULL, ICON_BLANK1);
1139 memset(r_ptr, 0,
sizeof(*r_ptr));
1142 *r_is_userdef =
false;
1150 if (but && but->rnapoin.data) {
1179 if (but->
tip ==
NULL || but->
tip[0] ==
'\0') {
1201 block,
UI_BTYPE_LABEL, 0, name, 0, 0,
w,
UI_UNIT_Y,
NULL, 0.0, 0.0, 0, 0,
"");
1250 block,
UI_BTYPE_BUT,
ot,
context,
icon, name, 0, 0,
w,
UI_UNIT_Y,
NULL);
1263 layout->
emboss = prev_emboss;
1283 if (properties || r_opptr) {
1286 opptr->
data = properties;
1336 uiItemL(layout,
TIP_(
"Menu Missing:"), ICON_NONE);
1337 uiItemL(layout, menu_id, ICON_NONE);
1361 const char *menu_id,
1417 const char *propname,
1441 const char *propname,
1509 bool last_iter =
false;
1511 for (
int i = 1; item->
identifier && !last_iter; i++, item++) {
1519 for (tmp = item + 1; tmp->
identifier; tmp++) {
1527 block,
ot, propname, properties, item_array, totitem,
context, flag);
1562 if (item != item_array && !radial &&
split !=
NULL) {
1570 if (item->
icon || radial) {
1613 const char *propname,
1622 RNA_warning(
"%s '%s'",
ot ?
"unknown operator" :
"operator missing srna", opname);
1687 const char *propname,
1717 const char *propname,
1718 const char *value_str)
1765 const char *propname,
1782 const char *propname,
1799 const char *propname,
1817 const char *propname,
1856 bool is_checkbox_only =
false;
1859 name =
"non-empty text";
1862 if (
icon == ICON_NONE) {
1864 is_checkbox_only =
true;
1876 if (item->identifier[0]) {
1903 if (!name[0] &&
icon == ICON_NONE) {
1925 else if (is_checkbox_only) {
1958 for (
uiLayout *parent = cur_layout; parent; parent = parent->
parent) {
1959 if (parent->heading[0]) {
1970 bool respect_prop_split)
1972 const int prev_alignment = layout->
alignment;
1978 if (respect_prop_split) {
1986 heading_layout->
heading[0] =
'\0';
2009 return layout_split;
2034 bool use_prop_sep_split_label = use_prop_sep;
2037 #ifdef UI_PROP_DECORATE
2039 bool use_prop_decorate;
2060 const bool no_icon = (toggle == 0);
2080 if (use_prop_sep ==
false) {
2085 if (use_prop_sep ==
false) {
2094 if (use_prop_sep ==
false) {
2100 if (no_icon ==
false) {
2101 if (icon == ICON_NONE) {
2113 icon = ICON_CHECKBOX_DEHLT;
2115 else if (is_array) {
2117 ICON_CHECKBOX_DEHLT;
2128 icon = ICON_CHECKBOX_DEHLT;
2131 icon = (enum_value & value) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
2134 icon = (enum_value == value) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
2141 #ifdef UI_PROP_SEP_ICON_WIDTH_EXCEPTION
2144 use_prop_sep_split_label =
false;
2147 use_split_empty_name =
true;
2177 #ifdef UI_PROP_DECORATE
2178 if (ui_decorate.use_prop_decorate) {
2180 layout_row->
space = 0;
2185 if ((name[0] ==
'\0') && !use_split_empty_name) {
2189 if (heading_layout) {
2196 bool label_added =
false;
2198 layout_sub->
space = 0;
2200 if (!use_prop_sep_split_label) {
2205 char str[2] = {
'\0'};
2206 for (
int a = 0;
a <
len;
a++) {
2208 const bool use_prefix = (
a == 0 && name && name[0]);
2210 char *s = name_with_suffix;
2219 use_prefix ? name_with_suffix :
str,
2239 block,
UI_BTYPE_LABEL, 0, name, 0, 0,
w,
UI_UNIT_Y,
NULL, 0.0, 0.0, 0, 0,
"");
2247 if (!label_added && heading_layout) {
2267 if (use_prop_sep_split_label) {
2275 #ifdef UI_PROP_DECORATE
2276 if (ui_decorate.use_prop_decorate) {
2278 ui_decorate.layout->space = 0;
2288 else if (heading_layout) {
2296 if (inside_prop_sep) {
2318 !use_prop_sep_split_label);
2322 if (icon && name[0] && !icon_only) {
2324 block,
UI_BTYPE_ROW, 0, icon, name, 0, 0,
w, h,
ptr, prop, -1, 0, value, -1, -1,
NULL);
2328 block,
UI_BTYPE_ROW, 0, icon, 0, 0,
w, h,
ptr, prop, -1, 0, value, -1, -1,
NULL);
2332 block,
UI_BTYPE_ROW, 0, name, 0, 0,
w, h,
ptr, prop, -1, 0, value, -1, -1,
NULL);
2341 but =
ui_item_with_label(layout, block, name, icon,
ptr, prop, index, 0, 0,
w, h, flag);
2342 bool results_are_suggestions =
false;
2346 results_are_suggestions =
true;
2399 if (but && no_icon) {
2400 if ((icon == ICON_NONE) && (but->
icon != ICON_NONE)) {
2411 #ifdef UI_PROP_DECORATE
2412 if (ui_decorate.use_prop_decorate) {
2416 layout_col->
space = 0;
2420 for (i = 0; i < ui_decorate.len && but_decorate; i++) {
2432 but_decorate = but->
next;
2441 layout->
emboss = prev_emboss;
2445 if (but && icon_only) {
2472 const char *panel_type)
2488 RNA_warning(
"property could not use a popover: %s.%s (%s)",
2503 const char *menu_type)
2519 RNA_warning(
"property could not use a menu: %s.%s (%s)",
2547 const char *propname,
2586 RNA_warning(
"enum property value not found: %s", value);
2591 if (item[
a].identifier[0] ==
'\0') {
2595 if (item[
a].value == ivalue) {
2596 const char *item_name = name ?
2602 layout,
ptr, prop,
RNA_ENUM_VALUE, ivalue, flag, item_name, icon ? icon : item[
a].icon);
2614 const char *propname,
2653 for (
int i = 0; i < totitem; i++) {
2654 if (item[i].identifier[0]) {
2666 uiItemL(column, item[i].name, ICON_NONE);
2701 if (ptype == srna) {
2722 const bool results_are_suggestions)
2725 bool has_search_fn =
false;
2740 if (has_search_fn || searchprop) {
2813 bool results_are_suggestions)
2821 RNA_warning(
"Property %s.%s must be a pointer, string or enum",
2827 RNA_warning(
"search collection property is not a collection type: %s.%s",
2834 if (icon == ICON_NONE) {
2850 if (use_prop_sep ==
false) {
2860 uiBut *but =
ui_item_with_label(layout, block, name, icon,
ptr, prop, 0, 0, 0,
w, h, 0);
2867 const char *propname,
2869 const char *searchpropname,
2881 RNA_warning(
"search collection property not found: %s.%s",
2933 if (
icon == ICON_NONE && force_menu) {
2936 else if (force_menu) {
2937 pad_factor.
text = 1.85;
2941 pad_factor.
text = 0.75f;
2948 if (heading_layout) {
2953 if (name[0] &&
icon) {
2958 if (force_menu && name[0]) {
2963 but =
uiDefMenuBut(block, func, arg, name, 0, 0,
w, h, tip);
2969 but->
poin = (
char *)but;
3088 TIP_(
"Animate property"));
3094 decorator_but->
rnaprop = prop;
3096 decorator_but->
rnaindex = (!is_array || is_expand) ? i : index;
3104 if (
ptr && propname) {
3152 RNA_warning(
"Panel type not found '%s'", panel_type);
3163 const char *category)
3172 RNA_warning(
"region type not found %d", region_id);
3178 if (pt->parent_id[0] ==
'\0') {
3180 if ((*category ==
'\0') ||
STREQ(pt->category, category)) {
3181 if (pt->poll ==
NULL || pt->poll(
C, pt)) {
3207 if (
icon && name[0]) {
3209 block,
UI_BTYPE_LABEL, 0,
icon, name, 0, 0,
w,
UI_UNIT_Y,
NULL, 0.0, 0.0, 0, 0,
NULL);
3213 block,
UI_BTYPE_LABEL, 0,
icon, 0, 0,
w,
UI_UNIT_Y,
NULL, 0.0, 0.0, 0, 0,
NULL);
3216 but =
uiDefBut(block,
UI_BTYPE_LABEL, 0, name, 0, 0,
w,
UI_UNIT_Y,
NULL, 0.0, 0.0, 0, 0,
NULL);
3240 uiLayout *layout,
const char *name,
int icon,
const bool highlight,
const bool redalert)
3271 return split_wrapper;
3324 if (
icon && name[0]) {
3343 block,
UI_BTYPE_BUT, argval,
icon, 0, 0,
w,
UI_UNIT_Y, retvalue, 0.0, 0.0, 0, -1,
"");
3347 block,
UI_BTYPE_BUT, argval, name, 0, 0,
w,
UI_UNIT_Y, retvalue, 0.0, 0.0, 0, -1,
"");
3389 printf(
"Error: separator_spacer() not supported in popups.\n");
3394 printf(
"Error: separator_spacer() only supported in horizontal blocks.\n");
3462 const char *propname,
3491 *r_opptr = *but->
opptr;
3507 const char *propname,
3518 RNA_warning(
"operator missing srna '%s'", opname);
3528 const char *propname,
3594 layout,
C, block,
ptr, prop, ptr_highlight, prop_highlight,
NULL,
UI_UNIT_Y, icon_only);
3607 bool min_size_flag =
true;
3618 litem->
h =
MAX2(itemh, litem->
h);
3621 litem->
w += litem->
space;
3625 if (min_size_flag) {
3638 int x, neww, newtotw, itemw, minw, itemh,
offset;
3639 int freew, fixedx, freex, flag = 0, lastw = 0;
3643 const int y = litem->
y;
3659 w -= (tot - 1) * litem->
space;
3679 if (
w - lastw > 0) {
3697 if ((neww < minw || min_flag) &&
w != 0) {
3733 minw, fixedx, fixedw,
min_ii(
w, fixedw), !item->next, litem->
alignment, &extra_pixel);
3739 itemw, freex, freew,
w - fixedw, !item->next, litem->
alignment, &extra_pixel);
3741 last_free_item = item;
3747 if (freew + fixedw > 0 && freew + fixedw <
w) {
3748 offset =
w - (fixedw + freew);
3752 if (freew + fixedw > 0 && freew + fixedw <
w) {
3753 offset = (
w - (fixedw + freew)) / 2;
3768 extra_pixel = litem->
w - (
x - litem->
x);
3772 for (
uiItem *item = last_free_item->
next; item; item = item->next) {
3777 litem->
w =
x - litem->
x;
3778 litem->
h = litem->
y -
y;
3787 bool min_size_flag =
true;
3797 litem->
w =
MAX2(litem->
w, itemw);
3800 if (item->next && (!is_box || item != litem->
items.
first)) {
3801 litem->
h += litem->
space;
3805 if (min_size_flag) {
3812 const int x = litem->
x;
3822 if (item->next && (!is_box || item != litem->
items.
first)) {
3831 litem->
h = litem->
y -
y;
3842 printf(
"Warning: Pie menus with more than %i items are currently unsupported\n",
3883 const int pie_radius =
U.pie_menu_radius *
UI_DPI_FAC;
3885 const int x = litem->
x;
3886 const int y = litem->
y;
3888 int minx =
x, miny =
y, maxx =
x, maxy =
y;
3907 factor[0] = (vec[0] > 0.01f) ? 0.0f : ((vec[0] < -0.01f) ? -1.0f : -0.5f);
3908 factor[1] = (vec[1] > 0.99f) ? 0.0f : ((vec[1] < -0.99f) ? -1.0f : -0.5f);
3930 x + vec[0] * pie_radius + factor[0] * itemw,
3931 y + vec[1] * pie_radius + factor[1] * itemh,
3935 minx =
min_ii(minx,
x + vec[0] * pie_radius - itemw / 2);
3936 maxx =
max_ii(maxx,
x + vec[0] * pie_radius + itemw / 2);
3937 miny =
min_ii(miny,
y + vec[1] * pie_radius - itemh / 2);
3938 maxy =
max_ii(maxy,
y + vec[1] * pie_radius + itemh / 2);
3944 litem->
w = maxx - minx;
3945 litem->
h = maxy - miny;
3960 int itemh, itemw,
x,
y;
3967 item,
x - itemw / 2,
y +
U.dpi_fac * (
U.pie_menu_threshold + 9.0f), itemw, itemh);
3998 litem->
w += 2 * boxspace;
3999 litem->
h += 2 * boxspace;
4012 const int w = litem->
w;
4013 const int h = litem->
h;
4015 litem->
x += boxspace;
4016 litem->
y -= boxspace;
4019 litem->
w -= 2 * boxspace;
4022 litem->
h -= 2 * boxspace;
4027 litem->
x -= boxspace;
4028 litem->
y -= boxspace;
4031 litem->
w += 2 * boxspace;
4034 litem->
h += 2 * boxspace;
4050 int itemw, itemh, maxw = 0;
4057 maxw =
MAX2(maxw, itemw);
4083 const int emh = toth / flow->
totcol;
4093 maxw =
max_ii(itemw, maxw);
4096 if (col < flow->totcol - 1 && emy <= -emh) {
4097 x += maxw + litem->
space;
4106 litem->
h = litem->
y - miny;
4113 int col, emh, itemw, itemh;
4130 emh = toth / flow->
totcol;
4147 if (col < flow->totcol - 1 && emy <= -emh) {
4153 const int remaining_width = litem->
w - (
x - litem->
x);
4155 const int remaining_columns = flow->
totcol -
col;
4156 w = (remaining_width - remaining_width_between_columns) / remaining_columns;
4160 litem->
h = litem->
y - miny;
4201 float tot_w = 0.0f, tot_h = 0.0f;
4202 float global_avg_w = 0.0f, global_totweight_w = 0.0f;
4203 int global_max_h = 0;
4205 float *avg_w =
NULL, *totweight_w =
NULL;
4232 memset(avg_w, 0,
sizeof(*avg_w) *
parameters->tot_columns);
4233 memset(totweight_w, 0,
sizeof(*totweight_w) *
parameters->tot_columns);
4237 memset(max_h, 0,
sizeof(*max_h) *
parameters->tot_rows);
4245 global_avg_w += (
float)(item_w * item_w);
4246 global_totweight_w += (
float)item_w;
4247 global_max_h =
max_ii(global_max_h, item_h);
4255 avg_w[index_col] += (
float)(item_w * item_w);
4256 totweight_w[index_col] += (
float)item_w;
4258 max_h[index_row] =
max_ii(max_h[index_row], item_h);
4268 global_avg_w /= global_totweight_w;
4270 for (i = 0; i <
parameters->tot_columns; i++) {
4271 avg_w[i] /= totweight_w[i];
4284 tot_h = global_max_h *
parameters->tot_columns;
4317 for (
int row = 0; row <
parameters->tot_rows; row++) {
4336 if (results->
tot_w) {
4339 if (results->
tot_h) {
4359 .row_major = gflow->row_major,
4360 .even_columns = gflow->even_columns,
4361 .even_rows = gflow->even_rows,
4362 .litem_w = litem->w,
4363 .litem_x = litem->x,
4364 .litem_y = litem->y,
4369 .tot_items = &gflow->tot_items,
4370 .global_avg_w = &avg_w,
4371 .global_max_h = &max_h,
4375 litem->
w = litem->
h = 0;
4388 if (avg_w == 0.0f) {
4403 const int step = modulo ? modulo : 1;
4420 if (modulo && gflow->
tot_rows % modulo != 0) {
4450 .row_major = gflow->row_major,
4451 .even_columns = gflow->even_columns,
4452 .even_rows = gflow->even_rows,
4453 .litem_w = litem->w,
4454 .litem_x = litem->x,
4455 .litem_y = litem->y,
4458 .tot_columns = gflow->tot_columns,
4459 .tot_rows = gflow->tot_rows,
4477 litem->
w = litem->
h = 0;
4495 .row_major = gflow->row_major,
4496 .even_columns = gflow->even_columns,
4497 .even_rows = gflow->even_rows,
4498 .litem_w = litem->w,
4499 .litem_x = litem->x,
4500 .litem_y = litem->y,
4503 .tot_columns = gflow->tot_columns,
4504 .tot_rows = gflow->tot_rows,
4507 .cos_x_array = cos_x,
4508 .cos_y_array = cos_y,
4509 .widths_array = widths,
4510 .heights_array = heights,
4520 const int w = widths[
col];
4521 const int h = heights[row];
4529 litem->
h = litem->
y - cos_y[gflow->
tot_rows - 1];
4531 litem->
y = litem->
y - litem->
h;
4543 int itemx, itemy, itemw, itemh;
4547 minx =
min_ii(minx, itemx);
4548 miny =
min_ii(miny, itemy);
4550 litem->
w =
MAX2(litem->
w, itemx + itemw);
4551 litem->
h =
MAX2(litem->
h, itemy + itemh);
4560 float scalex = 1.0f, scaley = 1.0f;
4561 int x,
y, newx, newy, itemx, itemy, itemh, itemw;
4572 minx =
min_ii(minx, itemx);
4573 miny =
min_ii(miny, itemy);
4575 totw =
max_ii(totw, itemx + itemw);
4576 toth =
max_ii(toth, itemy + itemh);
4582 if (litem->
w && totw > 0) {
4583 scalex = (
float)litem->
w / (
float)totw;
4585 if (litem->
h && toth > 0) {
4586 scaley = (
float)litem->
h / (
float)toth;
4590 y = litem->
y - scaley * toth;
4596 if (scalex != 1.0f) {
4597 newx = (itemx - minx) * scalex;
4598 itemw = (itemx - minx + itemw) * scalex - newx;
4599 itemx = minx + newx;
4602 if (scaley != 1.0f) {
4603 newy = (itemy - miny) * scaley;
4604 itemh = (itemy - miny + itemh) * scaley - newy;
4605 itemy = miny + newy;
4611 litem->
w = scalex * totw;
4612 litem->
h = litem->
y -
y;
4613 litem->
x =
x + litem->
w;
4627 float extra_pixel = 0.0f;
4635 const int y = litem->
y;
4637 const float percentage = (
split->percentage == 0.0f) ? 1.0f / (
float)tot :
split->percentage;
4639 const int w = (litem->
w - (tot - 1) * litem->
space);
4640 int colw =
w * percentage;
4641 colw =
MAX2(colw, 0);
4651 const float width = extra_pixel + (
w - (int)(
w * percentage)) / ((
float)tot - 1);
4654 colw =
MAX2(colw, 0);
4660 litem->
w =
x - litem->
x;
4661 litem->
h = litem->
y -
y;
4676 litem->
w =
MAX2(itemw, litem->
w);
4677 litem->
h =
MAX2(itemh, litem->
h);
4684 const int x = litem->
x;
4685 const int y = litem->
y;
4692 litem->
h =
MAX2(litem->
h, itemh);
4696 litem->
y =
y - litem->
h;
4702 litem->
align = align;
4709 litem->
w = layout->
w;
4783 return &flow->
litem;
4805 return &flow->
litem;
4818 box->
roundbox =
uiDefBut(layout->
root->
block,
type, 0,
"", 0, 0, 0, 0,
NULL, 0.0, 0.0, 0, 0,
"");
4926 split->percentage = percentage;
4930 return &
split->litem;
4970 layout->
scale[0] = scale;
4975 layout->
scale[1] = scale;
4980 layout->
units[0] = unit;
4985 layout->
units[1] = unit;
5055 return layout->
scale[0];
5060 return layout->
scale[1];
5065 return layout->
units[0];
5070 return layout->
units[1];
5120 #ifdef PROPERTY_SEARCH_USE_TOOLTIPS
5136 if (items_array ==
NULL) {
5141 for (
int i = 0; i < items_len; i++) {
5143 if (items_array[i].name ==
NULL) {
5169 uiBut *but = link->data;
5189 bool has_result =
false;
5196 uiBut *but = link->data;
5206 if (search_filter ==
NULL || search_filter[0] ==
'\0') {
5222 const bool has_result = (panel_label_matches) ?
5226 if (panel !=
NULL) {
5254 if (scale[0] != 0.0f) {
5259 if (scale[1] != 0.0f) {
5283 if (litem->
scale[0] != 0.0f || litem->
scale[1] != 0.0f) {
5320 if (litem->
units[0] > 0) {
5323 if (litem->
units[1] > 0) {
5334 #ifndef USE_UIBUT_SPATIAL_ALIGN
5355 else if (((
uiLayout *)item)->align) {
5486 block,
UI_BTYPE_SEPR, 0,
"", 0, 0, root->
padding, root->
padding,
NULL, 0.0, 0.0, 0, 0,
"");
5503 root->
style = style;
5504 root->
block = block;
5516 layout->
root = root;
5603 if (bitem->
but == but) {
5635 bitem->
but = new_but;
5732 bool arg_used =
false;
5737 if (copy_arg !=
NULL && arg_used) {
5738 arg = copy_arg(arg);
5777 if (r_prop !=
NULL) {
5816 printf(
"%s: opening menu \"%s\"\n", __func__, mt->
idname);
5886 if (child_pt->
poll ==
NULL || child_pt->
poll(
C, child_pt)) {
5953 "'rna':'%s.%s[%d]', ",
5966 for (item = lb->
first; item; item = item->
next) {
5970 #define CASE_ITEM(id) \
5972 const char *id_str = STRINGIFY(id); \
5973 BLI_dynstr_append(ds, "'type': '"); \
5975 BLI_dynstr_append(ds, id_str + 5); \
5976 BLI_dynstr_append(ds, "', "); \
5981 switch (item->
type) {
5998 switch (item->
type) {
6010 if (item != lb->
last) {
6025 ListBase layout_dummy_list = {&layout_copy, &layout_copy};
6041 const short icon_size = 64 *
U.dpi_fac;
6043 const int dialog_width = icon_size + (text_points_max *
size *
U.dpi_fac);
6047 const float icon_padding = 5.0f *
U.dpi_fac;
6049 const float split_factor = ((
float)icon_size + icon_padding) /
typedef float(TangentPoint)[2]
void CTX_store_set(bContext *C, bContextStore *store)
struct ARegion * CTX_wm_menu(const bContext *C)
bContextStore * CTX_store_add(ListBase *contexts, const char *name, const PointerRNA *ptr)
bContextStore * CTX_store_add_all(ListBase *contexts, bContextStore *context)
struct ARegion * CTX_wm_region(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
bContextStore * CTX_store_get(bContext *C)
struct IDProperty * IDP_New(char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void IDP_FreeProperty(struct IDProperty *prop)
struct IDProperty * IDP_CopyProperty(const struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
struct SpaceType * BKE_spacetype_from_id(int spaceid)
struct ARegionType * BKE_regiontype_from_id(const struct SpaceType *st, int regionid)
#define BLI_array_alloca(arr, realsize)
A dynamically sized string ADT.
DynStr * BLI_dynstr_new(void) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
char * BLI_dynstr_get_cstring(const DynStr *ds) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL()
void BLI_dynstr_appendf(DynStr *__restrict ds, const char *__restrict format,...) ATTR_PRINTF_FORMAT(2
void BLI_dynstr_append(DynStr *__restrict ds, const char *cstr) ATTR_NONNULL()
void BLI_kdtree_nd_() free(KDTree *tree)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
Generic memory manipulation API.
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
#define STRNCPY(dst, src)
#define STRNCPY_RLEN(dst, src)
char * BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
#define POINTER_FROM_INT(i)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define POINTER_AS_INT(i)
#define CTX_IFACE_(context, msgid)
#define RGN_ALIGN_ENUM_FROM_MASK(align)
_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.
#define RNA_STRUCT_BEGIN(sptr, prop)
#define RNA_warning(format,...)
eStringPropertySearchFlag
@ PROP_STRING_SEARCH_SUGGESTION
void UI_but_disable(uiBut *but, const char *disabled_hint)
uiBut * uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
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)
@ UI_BUT_ACTIVATE_ON_INIT
uiBut * uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, int x, int y, short width, short height, const char *tip)
@ UI_EMBOSS_NONE_OR_STATUS
void UI_popup_menu_but_set(uiPopupMenu *pup, struct ARegion *butregion, uiBut *but)
const struct uiStyle * UI_style_get_dpi(void)
uiBut * uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
bool UI_block_can_add_separator(const uiBlock *block)
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)
uiBut * uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
void UI_but_func_search_set_results_are_suggestions(uiBut *but, bool value)
void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg)
struct PointerRNA * UI_but_operator_ptr_get(uiBut *but)
uiBut * uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
uiBut * uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, const char *name, int icon, int x, int y, int width, int height)
void UI_but_func_search_set(uiBut *but, uiButSearchCreateFn search_create_fn, uiButSearchUpdateFn search_update_fn, void *arg, bool free_arg, uiFreeArgFunc search_arg_free_fn, uiButHandleFunc search_exec_fn, void *active)
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)
bool UI_but_is_userdef(const uiBut *but)
char *(* uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip)
void *(* uiCopyArgFunc)(const void *arg)
struct uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void UI_but_drawflag_enable(uiBut *but, int flag)
void UI_butstore_free(uiBlock *block, uiButStore *bs)
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
void(* uiFreeArgFunc)(void *arg)
void UI_but_drag_set_id(uiBut *but, struct ID *id)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
@ UI_ITEM_R_FORCE_BLANK_DECORATE
@ UI_ITEM_R_CHECKBOX_INVERT
int int UI_fontstyle_string_width_with_block_aspect(const struct uiFontStyle *fs, const char *str, float aspect) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void UI_but_type_set_menu_from_pulldown(uiBut *but)
uiBut * uiDefIconTextButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, wmOperatorCallContext opcontext, int icon, const char *str, int x, int y, short width, short height, const char *tip)
void UI_but_drawflag_disable(uiBut *but, int flag)
uiBut * uiDefIconButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, wmOperatorCallContext opcontext, int icon, int x, int y, short width, short height, const char *tip)
void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
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)
uiButStore * UI_butstore_create(uiBlock *block)
void UI_block_align_begin(uiBlock *block)
uiBut * uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x, int y, short width, short height, const char *tip)
void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p)
uiBut * uiDefButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, wmOperatorCallContext opcontext, const char *str, int x, int y, short width, short height, const char *tip)
uiBut * uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip)
uiBut * uiDefButI(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup)
void(* uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1)
void(* uiMenuHandleFunc)(struct bContext *C, void *arg, int event)
void UI_block_direction_set(uiBlock *block, char direction)
void UI_but_func_hold_set(uiBut *but, uiButHandleHoldFunc func, void *argN)
void UI_template_fix_linking(void)
uiBut * uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height)
void UI_but_unit_type_set(uiBut *but, int unit_type)
void UI_but_flag_enable(uiBut *but, int flag)
uiPopupMenu * UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL()
uiBut * uiDefIconButO(uiBlock *block, int type, const char *opname, wmOperatorCallContext opcontext, int icon, int x, int y, short width, short height, const char *tip)
void UI_block_align_end(uiBlock *block)
@ WM_OP_INVOKE_REGION_WIN
__forceinline bool all(const avxb &b)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void ui_but_update(uiBut *but)
uiBut * ui_but_change_type(uiBut *but, eButType new_type)
void ui_def_but_icon_clear(uiBut *but)
void ui_but_rna_menu_convert_to_panel_type(uiBut *but, const char *panel_type)
void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_strip)
void ui_but_rna_menu_convert_to_menu_type(uiBut *but, const char *menu_type)
const char ui_radial_dir_order[8]
bool ui_but_can_align(const uiBut *but)
int ui_but_align_opposite_to_area_align_get(const ARegion *region)
void ui_but_anim_decorate_cb(bContext *C, void *arg_but, void *UNUSED(arg_dummy))
void ui_rna_collection_search_update_fn(const struct bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first)
bool ui_block_is_popup_any(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
struct ARegion * ui_searchbox_create_generic(struct bContext *C, struct ARegion *butregion, uiButSearch *search_but)
bool ui_block_is_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
void ui_panel_tag_search_filter_match(struct Panel *panel)
@ UI_PIE_DEGREES_RANGE_LARGE
void ui_pie_menu_level_create(uiBlock *block, struct wmOperatorType *ot, const char *propname, struct IDProperty *properties, const EnumPropertyItem *items, int totitem, wmOperatorCallContext context, wmOperatorCallContext flag)
void ui_but_pie_dir(RadialDirection dir, float vec[2])
@ UI_SEARCH_FILTER_NO_MATCH
static void ui_litem_estimate_column(uiLayout *litem, bool is_box)
void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
static uiLayout * ui_item_local_sublayout(uiLayout *test, uiLayout *layout, bool align)
static int ui_litem_min_width(int itemw)
void uiItemS_ex(uiLayout *layout, float factor)
static void ui_litem_layout_column_flow(uiLayout *litem)
static const struct uiTextIconPadFactor ui_text_pad_default
bool uiLayoutGetActivateInit(uiLayout *layout)
uiLayout * uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading)
void uiItemL_ex(uiLayout *layout, const char *name, int icon, const bool highlight, const bool redalert)
static uiBut * uiItemL_(uiLayout *layout, const char *name, int icon)
void uiLayoutSetActive(uiLayout *layout, bool active)
static void ui_litem_init_from_parent(uiLayout *litem, uiLayout *layout, int align)
static void ui_item_flag(uiLayout *litem, int flag)
static void ui_item_move(uiItem *item, int delta_xmin, int delta_xmax)
static void ui_item_size(uiItem *item, int *r_w, int *r_h)
bool uiLayoutGetPropDecorate(uiLayout *layout)
int uiLayoutGetAlignment(uiLayout *layout)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
static int ui_text_icon_width_ex(uiLayout *layout, const char *name, int icon, const struct uiTextIconPadFactor *pad_factor)
void uiLayoutSetUnitsY(uiLayout *layout, float unit)
void uiItemMenuEnumR_prop(uiLayout *layout, struct PointerRNA *ptr, PropertyRNA *prop, const char *name, int icon)
uiLayout * uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading)
void uiItemMenuEnumFullO_ptr(uiLayout *layout, bContext *C, wmOperatorType *ot, const char *propname, const char *name, int icon, PointerRNA *r_opptr)
static void ui_litem_layout_column(uiLayout *litem, bool is_box, bool is_menu)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
static void ui_item_estimate(uiItem *item)
static void ui_litem_layout_overlap(uiLayout *litem)
static uiBut * uiItemFullO_ptr_ex(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, int flag, PointerRNA *r_opptr)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
static bool button_matches_search_filter(uiBut *but, const char *search_filter)
bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter)
uiLayout * uiLayoutGridFlow(uiLayout *layout, bool row_major, int columns_len, bool even_columns, bool even_rows, bool align)
uiLayout * uiLayoutOverlap(uiLayout *layout)
void uiItemFullOMenuHold_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, int flag, const char *menu_id, PointerRNA *r_opptr)
static void ui_item_rna_size(uiLayout *layout, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, bool icon_only, bool compact, int *r_w, int *r_h)
void uiLayoutSetFixedSize(uiLayout *layout, bool fixed_size)
static void ui_litem_estimate_column_flow(uiLayout *litem)
static uiBut * ui_item_menu(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg, void *argN, const char *tip, bool force_menu)
float uiLayoutGetUnitsY(uiLayout *layout)
uiPropertySplitWrapper uiItemPropertySplitWrapperCreate(uiLayout *parent_layout)
void uiLayoutSetScaleY(uiLayout *layout, float scale)
void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt)
static void ui_layout_heading_set(uiLayout *layout, const char *heading)
void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value_str)
static void ui_litem_estimate_split(uiLayout *litem)
static void ui_litem_estimate_overlap(uiLayout *litem)
static void ui_item_disabled(uiLayout *layout, const char *name)
static const char * ui_item_name_add_colon(const char *name, char namestr[UI_MAX_NAME_STR])
void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiLayoutSetActiveDefault(uiLayout *layout, bool active_default)
bContextStore * uiLayoutGetContextStore(uiLayout *layout)
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert)
void uiItemFullR_with_menu(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index, int value, int flag, const char *name, int icon, const char *menu_type)
void uiItemsFullEnumO_items(uiLayout *layout, wmOperatorType *ot, PointerRNA ptr, PropertyRNA *prop, IDProperty *properties, wmOperatorCallContext context, int flag, const EnumPropertyItem *item_array, int totitem)
static uiLayout * ui_layout_heading_find(uiLayout *cur_layout)
static void ui_item_position(uiItem *item, int x, int y, int w, int h)
#define UI_ITEM_PROP_SEP_DIVIDE
uiLayout * uiLayoutAbsolute(uiLayout *layout, bool align)
void uiLayoutSetScaleX(uiLayout *layout, float scale)
static bool ui_item_rna_is_expand(PropertyRNA *prop, int index, int item_flag)
static void ui_item_layout(uiItem *item)
static void ui_litem_layout_absolute(uiLayout *litem)
static bool ui_item_is_radial_displayable(uiItem *item)
float uiLayoutGetUnitsX(uiLayout *layout)
bool ui_layout_replace_but_ptr(uiLayout *layout, const void *old_but_ptr, uiBut *new_but)
void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname, IDProperty *properties, wmOperatorCallContext context, int flag)
static void ui_litem_grid_flow_compute(ListBase *items, UILayoutGridFlowInput *parameters, UILayoutGridFlowOutput *results)
struct UILayoutGridFlowInput UILayoutGridFlowInput
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, int flag, PointerRNA *r_opptr)
void uiItemMenuEnumO(uiLayout *layout, bContext *C, const char *opname, const char *propname, const char *name, int icon)
void uiItemMenuEnumFullO(uiLayout *layout, bContext *C, const char *opname, const char *propname, const char *name, int icon, PointerRNA *r_opptr)
uiLayout * uiLayoutBox(uiLayout *layout)
static uiLayoutItemBx * ui_layout_box(uiLayout *layout, int type)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
bool uiLayoutGetEnabled(uiLayout *layout)
void uiItemV(uiLayout *layout, const char *name, int icon, int argval)
uiBlock * uiLayoutAbsoluteBlock(uiLayout *layout)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
wmOperatorType * UI_but_operatortype_get_from_enum_menu(uiBut *but, PropertyRNA **r_prop)
static void ui_item_enum_expand_exec(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const char *uiname, const int h, const eButType but_type, const bool icon_only)
void uiItemS(uiLayout *layout)
PanelType * UI_but_paneltype_get(uiBut *but)
void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name, int icon)
float uiLayoutGetScaleY(uiLayout *layout)
void uiItemDecoratorR_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index)
static bool block_search_filter_tag_buttons(uiBlock *block, const char *search_filter)
void uiItemPopoverPanelFromGroup(uiLayout *layout, bContext *C, int space_id, int region_id, const char *context, const char *category)
static void ui_item_offset(uiItem *item, int *r_x, int *r_y)
void uiItemEnumO(uiLayout *layout, const char *opname, const char *name, int icon, const char *propname, int value)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
bool uiLayoutGetActive(uiLayout *layout)
static void ui_layout_heading_label_add(uiLayout *layout, uiLayout *heading_layout, bool right_align, bool respect_prop_split)
uiLayout * uiLayoutColumnFlow(uiLayout *layout, int number, bool align)
static void ui_litem_layout_row(uiLayout *litem)
struct MenuItemLevel MenuItemLevel
void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
static RadialDirection ui_get_radialbut_vec(float vec[2], short itemnum)
static void ui_item_enum_expand_tabs(uiLayout *layout, bContext *C, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *ptr_highlight, PropertyRNA *prop_highlight, const char *uiname, const int h, const bool icon_only)
BLI_INLINE bool ui_layout_is_radial(const uiLayout *layout)
bool uiLayoutGetKeepAspect(uiLayout *layout)
static void ui_layout_add_padding_button(uiLayoutRoot *root)
struct uiLayoutItemRoot uiLayoutItemRoot
bool uiLayoutGetPropSep(uiLayout *layout)
void ui_item_paneltype_func(bContext *C, uiLayout *layout, void *arg_pt)
static int ui_layout_vary_direction(uiLayout *layout)
void UI_paneltype_draw(bContext *C, PanelType *pt, uiLayout *layout)
void uiItemLDrag(uiLayout *layout, PointerRNA *ptr, const char *name, int icon)
void uiLayoutSetUnitsX(uiLayout *layout, float unit)
void uiItemFloatO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, float value)
static void ui_litem_estimate_row(uiLayout *litem)
static const struct uiTextIconPadFactor ui_text_pad_none
void uiItemEnumR_string_prop(uiLayout *layout, struct PointerRNA *ptr, PropertyRNA *prop, const char *value, const char *name, int icon)
static void ui_layout_end(uiBlock *block, uiLayout *layout, int *r_x, int *r_y)
eUIEmbossType uiLayoutGetEmboss(uiLayout *layout)
void uiItemPointerR(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
void uiLayoutSetTooltipFunc(uiLayout *layout, uiButToolTipFunc func, void *arg, uiCopyArgFunc copy_arg, uiFreeArgFunc free_arg)
static bool block_search_panel_label_matches(const uiBlock *block, const char *search_string)
int uiLayoutGetLocalDir(const uiLayout *layout)
void uiItemSpacer(uiLayout *layout)
void uiItemM_ptr(uiLayout *layout, MenuType *mt, const char *name, int icon)
static int ui_item_fit(int item, int pos, int all, int available, bool is_last, int alignment, float *extra_pixel)
void ui_layout_list_set_labels_active(uiLayout *layout)
struct uiLayoutItemSplit uiLayoutItemSplit
void uiLayoutSetKeepAspect(uiLayout *layout, bool keepaspect)
struct uiLayoutItemFlow uiLayoutItemFlow
void UI_menutype_draw(bContext *C, MenuType *mt, struct uiLayout *layout)
bool uiLayoutGetFixedSize(uiLayout *layout)
static void ui_litem_estimate_box(uiLayout *litem)
static void ui_rna_collection_search_arg_free_fn(void *ptr)
void UI_context_active_but_prop_get_filebrowser(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, bool *r_is_undo, bool *r_is_userdef)
static bool ui_layout_has_panel_label(const uiLayout *layout, const PanelType *pt)
static const struct uiTextIconPadFactor ui_text_pad_compact
void uiItemMContents(uiLayout *layout, const char *menuname)
bool uiLayoutGetActiveDefault(uiLayout *layout)
int uiLayoutGetOperatorContext(uiLayout *layout)
static void ui_litem_estimate_grid_flow(uiLayout *litem)
void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname)
static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int len, int x, int y, int w, int UNUSED(h), bool expand, bool slider, int toggle, bool icon_only, bool compact, bool show_text)
static void ui_keymap_but_cb(bContext *UNUSED(C), void *but_v, void *UNUSED(key_v))
uiLayout * uiLayoutRadial(uiLayout *layout)
void uiItemEnumR_prop(uiLayout *layout, const char *name, int icon, struct PointerRNA *ptr, PropertyRNA *prop, int value)
static void menu_item_enum_opname_menu(bContext *UNUSED(C), uiLayout *layout, void *arg)
void uiItemDecoratorR(uiLayout *layout, PointerRNA *ptr, const char *propname, int index)
void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss)
static uiButtonItem * ui_layout_find_button_item(const uiLayout *layout, const uiBut *but)
static void ui_layout_introspect_items(DynStr *ds, ListBase *lb)
static void ui_item_scale(uiLayout *litem, const float scale[2])
int uiLayoutGetWidth(uiLayout *layout)
static void ui_layout_introspect_button(DynStr *ds, uiButtonItem *bitem)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
static void search_id_collection(StructRNA *ptype, PointerRNA *r_ptr, PropertyRNA **r_prop)
static void ui_litem_estimate_root(uiLayout *UNUSED(litem))
static void ui_litem_layout_split(uiLayout *litem)
void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *value, const char *name, int icon)
void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
struct uiLayoutRoot uiLayoutRoot
float uiLayoutGetScaleX(uiLayout *layout)
bool UI_block_layout_needs_resolving(const uiBlock *block)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but)
static void ui_but_tip_from_enum_item(uiBut *but, const EnumPropertyItem *item)
void uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, int flag, PointerRNA *r_opptr)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void UI_block_layout_free(uiBlock *block)
static void ui_litem_layout_radial(uiLayout *litem)
#define UI_OPERATOR_ERROR_RET(_ot, _opname, return_statement)
static void ui_litem_estimate_absolute(uiLayout *litem)
static void ui_item_enum_expand_handle(bContext *C, void *arg1, void *arg2)
void uiItemPointerR_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, const char *name, int icon, bool results_are_suggestions)
static uiBut * ui_item_with_label(uiLayout *layout, uiBlock *block, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, int x, int y, int w_hint, int h, int flag)
void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y)
uiLayout * uiItemL_respect_property_split(uiLayout *layout, const char *text, int icon)
void uiItemEnumO_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, const char *propname, int value)
static bool button_group_has_search_match(uiButtonGroup *button_group, const char *search_filter)
static bool ui_layout_variable_size(uiLayout *layout)
uiLayout * uiLayoutListBox(uiLayout *layout, uiList *ui_list, PointerRNA *actptr, PropertyRNA *actprop)
static int ui_text_icon_width(uiLayout *layout, const char *name, int icon, bool compact)
void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init)
static void ui_layout_free(uiLayout *layout)
static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index)
static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const char *uiname, const int h, const bool icon_only)
void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value)
void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index, int value, int flag, const char *name, int icon)
static void ui_item_menu_hold(struct bContext *C, ARegion *butregion, uiBut *but)
void uiItemEnumR(uiLayout *layout, const char *name, int icon, struct PointerRNA *ptr, const char *propname, int value)
static void ui_litem_layout_box(uiLayout *litem)
static void ui_paneltype_draw_impl(bContext *C, PanelType *pt, uiLayout *layout, bool show_header)
@ ITEM_LAYOUT_COLUMN_FLOW
void UI_block_layout_set_current(uiBlock *block, uiLayout *layout)
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg)
static void ui_item_align(uiLayout *litem, short nr)
struct uiLayoutItemBx uiLayoutItemBx
static void ui_litem_layout_grid_flow(uiLayout *litem)
static void menu_item_enum_rna_menu(bContext *UNUSED(C), uiLayout *layout, void *arg)
MenuType * UI_but_menutype_get(uiBut *but)
void ui_layout_remove_but(uiLayout *layout, const uiBut *but)
struct uiLayoutItemGridFlow uiLayoutItemGridFlow
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
const char * UI_layout_introspect(uiLayout *layout)
void uiItemPopoverPanel_ptr(uiLayout *layout, const bContext *C, PanelType *pt, const char *name, int icon)
bool uiLayoutGetRedAlert(uiLayout *layout)
void ui_layout_add_but(uiLayout *layout, uiBut *but)
static void ui_litem_layout_root(uiLayout *litem)
struct UILayoutGridFlowOutput UILayoutGridFlowOutput
void uiItemMenuFN(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *argN)
static void ui_item_enum_expand_elem_exec(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const char *uiname, const int h, const eButType but_type, const bool icon_only, const EnumPropertyItem *item, const bool is_first)
void uiItemTabsEnumR_prop(uiLayout *layout, bContext *C, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *ptr_highlight, PropertyRNA *prop_highlight, bool icon_only)
uiLayout * UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const uiStyle *style)
void uiItemPopoverPanel(uiLayout *layout, const bContext *C, const char *panel_type, const char *name, int icon)
static void ui_litem_layout_root_radial(uiLayout *litem)
struct uiButtonItem uiButtonItem
static uiLayout * ui_item_prop_split_layout_hack(uiLayout *layout_parent, uiLayout *layout_split)
static bool ui_item_is_radial_drawable(uiButtonItem *bitem)
void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon)
static const char * ui_menu_enumpropname(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int retval)
void uiItemFullR_with_popover(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index, int value, int flag, const char *name, int icon, const char *panel_type)
void uiLayoutContextCopy(uiLayout *layout, bContextStore *context)
void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv)
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, PointerRNA *ptr)
@ UI_ITEM_INSIDE_PROP_SEP
@ UI_ITEM_PROP_DECORATE_NO_PAD
@ UI_ITEM_AUTO_FIXED_SIZE
uiLayout * uiItemsAlertBox(uiBlock *block, const int size, const eAlertIcon icon)
uiBut * ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, const bool results_are_suggestions)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
double parameters[NUM_PARAMETERS]
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
bool active
all scheduled work for the GPU.
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
static const pxr::TfToken st("st", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
const char * RNA_struct_identifier(const StructRNA *type)
void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, bool value)
const char * RNA_property_description(PropertyRNA *prop)
bool RNA_property_array_check(PropertyRNA *prop)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
bool RNA_property_is_unlink(PropertyRNA *prop)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
bool RNA_struct_is_ID(const StructRNA *type)
const char * RNA_property_identifier(const PropertyRNA *prop)
bool RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *r_value)
eStringPropertySearchFlag RNA_property_string_search_flag(PropertyRNA *prop)
bool RNA_property_animateable(const PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_ui_icon(const PropertyRNA *prop)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
PropertyType RNA_property_type(PropertyRNA *prop)
const PointerRNA PointerRNA_NULL
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
char RNA_property_array_item_char(PropertyRNA *prop, int index)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
const char * RNA_property_translation_context(const PropertyRNA *prop)
int RNA_property_array_dimension(const PointerRNA *ptr, PropertyRNA *prop, int length[])
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_flag(PropertyRNA *prop)
int RNA_struct_ui_icon(const StructRNA *type)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name)
void RNA_property_enum_items_gettexted_all(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
bool RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
void RNA_main_pointer_create(struct Main *main, PointerRNA *r_ptr)
const char * RNA_property_ui_name(const PropertyRNA *prop)
void(* draw)(const struct bContext *C, struct Panel *panel)
bool(* poll)(const struct bContext *C, struct PanelType *pt)
void(* draw_header)(const struct bContext *C, struct Panel *panel)
char translation_context[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
struct PointerRNA * custom_data_ptr
struct EditBone * act_edbone
uiPopupBlockHandle * handle
struct PieMenuData pie_data
struct uiLayout * curlayout
struct PropertyRNA * rnaprop
struct PointerRNA rnapoin
struct PointerRNA rnasearchpoin
struct PropertyRNA * rnasearchprop
struct bContextStore * context
uiMenuCreateFunc menu_create_func
struct PointerRNA * opptr
struct wmOperatorType * optype
char drawstr[UI_MAX_DRAW_STR]
struct PropertyRNA * rnaprop
struct PointerRNA rnapoin
struct uiLayoutRoot * prev
struct uiLayoutRoot * next
wmOperatorCallContext opcontext
uiMenuHandleFunc handlefunc
char heading[UI_MAX_NAME_STR]
uiLayout * child_items_layout
uiLayout * decorate_column
PropertyRNA * target_prop
PropertyRNA * search_prop
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
char *(* get_description)(struct bContext *C, struct wmOperatorType *, struct PointerRNA *)
struct wmEvent * eventstate
int WM_keymap_item_to_string(const wmKeyMapItem *kmi, const bool compact, char *result, const int result_len)
char * WM_key_event_operator_string(const bContext *C, const char *opname, wmOperatorCallContext opcontext, IDProperty *properties, const bool is_strict, char *result, const int result_len)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
const char * WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *properties)
void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, const char *opstring)
char * WM_operator_pystring_ex(bContext *C, wmOperator *op, const bool all_args, const bool macro_args, wmOperatorType *ot, PointerRNA *opptr)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
void WM_operator_properties_sanitize(PointerRNA *ptr, const bool no_context)
PanelType * WM_paneltype_find(const char *idname, bool quiet)