62 #include "RNA_prototypes.h"
84 #define USE_CONT_MOUSE_CORRECT
86 #define USE_DRAG_TOGGLE
89 #define USE_DRAG_MULTINUM
98 #define USE_KEYNAV_LIMIT
101 #define USE_DRAG_POPUP
113 #define UI_MAX_PASSWORD_STR 128
125 #define UI_PROP_SCALE_LOG_MIN 0.5e-8f
131 #define UI_PROP_SCALE_LOG_SNAP_OFFSET 0.03f
144 #define UI_DRAG_MAP_SOFT_RANGE_PIXEL_MAX 1000
163 const bool is_click);
166 const bool is_click);
174 #ifdef USE_KEYNAV_LIMIT
185 #define BUTTON_FLASH_DELAY 0.020
186 #define MENU_SCROLL_INTERVAL 0.1
187 #define PIE_MENU_INTERVAL 0.01
188 #define BUTTON_AUTO_OPEN_THRESH 0.2
189 #define BUTTON_MOUSE_TOWARDS_THRESH 1.0
191 #define BUTTON_KEYNAV_PX_LIMIT 8
194 #define MENU_TOWARDS_MARGIN 20
196 #define MENU_TOWARDS_WIGGLE_ROOM 64
198 #define BUTTON_DRAGLOCK_THRESH 3
246 # define USE_ALLSELECT_LAYER_HACK
277 const double value_orig);
279 # define IS_ALLSELECT_EVENT(event) (((event)->modifier & KM_ALT) != 0)
282 # define UI_BUT_IS_SELECT_CONTEXT UI_BUT_NODE_ACTIVE
286 #ifdef USE_DRAG_MULTINUM
291 # define DRAG_MULTINUM_THRESHOLD_DRAG_X (UI_UNIT_Y / 4)
298 # define DRAG_MULTINUM_THRESHOLD_DRAG_Y (UI_UNIT_Y / 4)
308 # define DRAG_MULTINUM_THRESHOLD_VERTICAL (0.75f)
315 # ifdef USE_ALLSELECT
425 #ifdef USE_CONT_MOUSE_CORRECT
439 #ifdef USE_KEYNAV_LIMIT
443 #ifdef USE_DRAG_MULTINUM
525 #ifdef USE_DRAG_MULTINUM
551 static int lastdy = 0;
559 if ((dy > 0 && lastdy < 0) || (dy < 0 && lastdy > 0)) {
589 uiBut *but_iter = but;
594 but_iter = but_iter->
prev;
599 but_found = but_iter;
600 if (direction == 1) {
604 but_iter = but_iter->
next;
612 return shift ? 0.05f : 1.0f;
625 *r_mx = (
data->dragstartx * (1.0f - fac) + mx * fac);
626 *r_my = (
data->dragstarty * (1.0f - fac) + my * fac);
640 if (mx ==
data->draglastx) {
644 if (
data->draglock) {
648 #ifdef USE_DRAG_MULTINUM
649 if (
ELEM(
data->multi_data.init, BUTTON_MULTI_INIT_UNSET, BUTTON_MULTI_INIT_SETUP)) {
653 data->draglock =
false;
654 data->dragstartx = mx;
676 &RNA_AddonPreferences,
677 &RNA_KeyConfigPreferences,
679 &RNA_UserAssetLibrary);
691 U.runtime.is_dirty =
true;
734 *r_hue = roundf((*r_hue) * snap_increment) / snap_increment;
767 const uiBut *context_but)
774 after->
opptr = *properties;
778 if (context_but && context_but->
context) {
872 if (
data->custom_interaction_handle !=
NULL) {
911 bool skip_undo =
false;
928 if (
str ==
NULL ||
str[0] ==
'\0' || str_len_clip == 0) {
929 str =
"Unknown Action";
930 str_len_clip = strlen(
str);
939 if (
ELEM(but->
rnaprop, &rna_ID_name, &rna_Object_active_shape_key_index)) {
950 if (skip_undo ==
false) {
1088 data->applied =
true;
1097 data->applied =
true;
1109 data->applied =
true;
1120 value_toggle = (value == 0.0);
1122 value_toggle = !value_toggle;
1134 data->applied =
true;
1151 data->applied =
true;
1159 if (
data->apply_through_extra_icon) {
1175 const uiBut *context_but,
1239 data->applied =
true;
1254 data->applied =
true;
1272 data->cancel =
true;
1281 data->cancel =
true;
1293 data->applied =
true;
1303 data->applied =
true;
1310 data->applied =
true;
1317 data->applied =
true;
1324 data->applied =
true;
1333 #ifdef USE_DRAG_MULTINUM
1342 mbut_state->
but = but;
1344 # ifdef USE_ALLSELECT
1358 if (mbut_state->
but == but) {
1374 # ifdef USE_ALLSELECT
1389 # ifdef USE_ALLSELECT
1390 if (
data->multi_data.mbuts) {
1411 if (
data->multi_data.bs_mbuts) {
1422 bool changed =
false;
1424 seg[0][0] =
data->multi_data.drag_start[0];
1425 seg[0][1] =
data->multi_data.drag_start[1];
1427 seg[1][0] =
event->xy[0];
1428 seg[1][1] =
event->xy[1];
1435 data->multi_data.has_mbuts =
false;
1439 bool drag_prev =
false;
1440 bool drag_curr =
false;
1451 if (but_active != but) {
1460 data->multi_data.has_mbuts =
true;
1467 changed |= (drag_prev != drag_curr);
1491 if (
data->origvalue != 0.0) {
1492 data->multi_data.is_proportional =
true;
1500 const double value_delta =
data->value -
data->origvalue;
1501 const double value_scale =
data->multi_data.is_proportional ? (
data->value /
data->origvalue) :
1514 if (mbut_state ==
NULL) {
1516 printf(
"%s: Can't find button\n", __func__);
1525 # ifdef USE_ALLSELECT
1526 if (
data->select_others.is_enabled) {
1537 but->active->origvalue = mbut_state->
origvalue;
1539 but->active->select_others.
do_free =
false;
1546 but->active->value =
data->value;
1551 if (
data->multi_data.is_proportional) {
1552 but->active->value = mbut_state->
origvalue * value_scale;
1555 but->active->value = mbut_state->
origvalue + value_delta;
1559 CLAMP(but->active->value, (
double)but->softmin, (
double)but->softmax);
1574 #ifdef USE_DRAG_TOGGLE
1589 ICON_DECORATE_KEYFRAME,
1590 ICON_DECORATE_ANIMATE,
1591 ICON_DECORATE_OVERRIDE);
1625 bContext *
C,
ARegion *region,
const int pushed_state,
const int xy_src[2],
const int xy_dst[2])
1629 bool changed =
false;
1632 float xy_a_block[2] = {
UNPACK2(xy_src)};
1633 float xy_b_block[2] = {
UNPACK2(xy_dst)};
1653 if (pushed_state_but == pushed_state) {
1662 if (
U.runtime.is_dirty ==
false) {
1680 bool do_draw =
false;
1694 const float but_cent_new[2] = {
1720 xy[0] = (drag_info->
xy_lock[0] ==
false) ? xy_input[0] : drag_info->
xy_last[0];
1721 xy[1] = (drag_info->
xy_lock[1] ==
false) ? xy_input[1] : drag_info->
xy_last[1];
1744 switch (event->
type) {
1788 #ifdef USE_ALLSELECT
1794 bool success =
false;
1810 bool use_path_from_id;
1828 &
ptr, &link->ptr, prop, path, use_path_from_id, &lptr, &lprop)) {
1868 success = (selctx_data->
elems_len != 0);
1892 if (selctx_data->
elems) {
1904 const double value_orig)
1906 if (selctx_data->
elems) {
1910 const bool use_delta = (selctx_data->
is_copy ==
false);
1923 delta.f = use_delta ? (value - value_orig) : value;
1927 delta.i = use_delta ? ((int)value - (
int)value_orig) : (
int)value;
1949 # ifdef USE_ALLSELECT_LAYER_HACK
1962 tmparray[index] =
true;
1964 for (
int i = 0; i < selctx_data->
elems_len; i++) {
1979 for (
int i = 0; i < selctx_data->
elems_len; i++) {
1984 float other_value = use_delta ? (other->
val_f + delta.f) : delta.f;
1994 int other_value = use_delta ? (other->
val_i + delta.i) : delta.i;
2004 const bool other_value = delta.b;
2013 const int other_value = delta.i;
2045 const int drag_threshold =
min_ii(
2052 data->cancel =
true;
2053 #ifdef USE_DRAG_TOGGLE
2073 &
data->window->modalhandlers,
2097 if (lock_axis != -1) {
2098 drag_info->
xy_lock[lock_axis] =
true;
2159 data->applied =
true;
2166 data->applied =
true;
2173 data->applied =
true;
2180 data->applied =
true;
2193 if (!
data->applied) {
2210 data->applied_interactive =
true;
2212 else if (
data->applied_interactive) {
2216 #ifdef USE_ALLSELECT
2217 # ifdef USE_DRAG_MULTINUM
2223 if (
data->select_others.elems_len == 0) {
2228 data->select_others.is_enabled =
true;
2231 if (
data->select_others.elems_len == 0) {
2233 data->select_others.elems_len = -1;
2240 double *editval = but->
editval;
2241 float *editvec = but->
editvec;
2360 #ifdef USE_DRAG_MULTINUM
2361 if (
data->multi_data.has_mbuts) {
2362 if ((
data->multi_data.init == BUTTON_MULTI_INIT_ENABLE) && (
data->multi_data.skip ==
false)) {
2373 #ifdef USE_ALLSELECT
2378 data->origvalue = 0.0;
2398 if (
data->custom_interaction_handle !=
NULL) {
2436 for (
int i = 0; i < values_len; i++) {
2453 const int values_len,
2457 const int values_end = values_len - 1;
2460 for (
int i = 0; i < values_len; i++) {
2462 output + ofs, output_len_max - ofs, (i != values_end) ?
"%f, " :
"%f]", values[i]);
2469 float *values = alloca(values_len *
sizeof(
float));
2477 BLI_assert(0 <= values_len_expected && values_len_expected <= 4);
2480 const int values_len_actual = sscanf(
2481 text,
"[%f, %f, %f, %f, %f]", &
v[0], &
v[1], &
v[2], &
v[3], &
v[4]);
2483 if (values_len_actual == values_len_expected) {
2484 memcpy(values,
v,
sizeof(
float) * values_len_expected);
2496 if (values_len > 4) {
2501 float *values = alloca(
sizeof(
float) * values_len);
2527 data->value = value;
2711 char buf[4096] = {0};
2712 const int buf_max_len =
sizeof(buf);
2715 bool is_buf_set =
false;
2719 switch (but->
type) {
2722 if (!has_required_data) {
2735 if (!has_required_data) {
2743 if (!has_required_data) {
2752 if (!has_required_data) {
2804 int buf_paste_len = 0;
2810 switch (but->
type) {
2813 if (!has_required_data) {
2825 if (!has_required_data) {
2832 if (!has_required_data) {
2840 if (!has_required_data) {
2889 const char *strpos = butstr;
2890 const char *str_end = butstr + strlen(butstr);
2891 for (
int i = 0; i <
pos; i++) {
2895 return (strpos - butstr);
2919 if (but->
pos >= 0) {
2930 if (but->
pos >= 0) {
2938 memset(butstr,
'*',
len);
2986 if (maxlen >
data->maxlen) {
2988 data->maxlen = maxlen;
2994 if (
data->is_str_dynamic) {
3009 const int len = strlen(
str);
3010 bool changed =
false;
3021 const size_t str_step_ofs,
3022 const rcti *glyph_step_bounds,
3023 const int UNUSED(glyph_advance_x),
3024 const rcti *glyph_bounds,
3025 const int UNUSED(glyph_bearing[2]),
3030 if (cursor_data[0] <
center) {
3031 cursor_data[1] = str_step_ofs;
3049 float starty_dummy = 0.0f;
3073 str_last = &
str[but->
ofs];
3091 str_last = &
str[but->
ofs];
3092 const int str_last_len = strlen(str_last);
3093 const int x_pos = (int)(
x - startx);
3094 int glyph_data[2] = {
3104 if (glyph_data[1] == -1) {
3105 glyph_data[1] = str_last_len;
3107 but->
pos = glyph_data[1] + but->
ofs;
3138 bool changed =
false;
3140 if (
data->is_str_dynamic) {
3144 if (len_new <= data->maxlen) {
3146 size_t step = buf_len;
3154 if ((
len + step >=
data->maxlen) && (
data->maxlen - (
len + 1) > 0)) {
3160 step =
data->maxlen - (
len + 1);
3164 if (step && (
len + step < data->maxlen)) {
3166 memcpy(&
str[but->
pos], buf, step *
sizeof(
char));
3178 const char buf[2] = {ascii,
'\0'};
3189 const int len = strlen(
str);
3190 const int pos_prev = but->
pos;
3196 if (has_sel && !
select) {
3208 data->sel_pos_init = but->
pos;
3211 int pos_i = but->
pos;
3216 if (has_sel ==
false) {
3217 data->sel_pos_init = pos_prev;
3234 const int len = strlen(
str);
3236 bool changed =
false;
3245 else if (direction) {
3249 else if (but->
pos >= 0 && but->
pos <
len) {
3263 else if (but->
pos > 0) {
3284 if (
data->searchbox) {
3306 bool changed =
false;
3330 char *buf =
MEM_mallocN(
sizeof(
char) * (sellen + 1),
"ui_textedit_copypaste");
3347 #ifdef WITH_INPUT_IME
3361 wm_window_IME_begin(win,
x,
y, 0, 0,
true);
3367 wm_window_IME_end(win);
3370 void ui_but_ime_reposition(
uiBut *but,
int x,
int y,
bool complete)
3375 wm_window_IME_begin(but->
active->
window,
x,
y - 4, 0, 0, complete);
3378 wmIMEData *ui_but_ime_data_get(
uiBut *but)
3393 bool no_zero_strip =
false;
3397 #ifdef USE_DRAG_MULTINUM
3399 if (
data->applied_interactive) {
3401 data->cancel =
true;
3403 data->cancel =
false;
3405 data->applied_interactive =
false;
3409 #ifdef USE_ALLSELECT
3412 data->select_others.is_enabled =
true;
3413 data->select_others.is_copy =
true;
3420 if (
data->maxlen != 0) {
3428 data->is_str_dynamic =
true;
3445 const int len = strlen(
data->str);
3448 data->sel_pos_init = 0;
3474 if (
data->searchbox) {
3489 #ifdef WITH_INPUT_IME
3491 ui_textedit_ime_begin(win, but);
3506 printf(
"%s: invalid utf8 - stripped chars %d\n", __func__, strip);
3510 if (
data->searchbox) {
3511 if (
data->cancel ==
false) {
3524 data->cancel =
true;
3527 data->escapecancel =
true;
3548 #ifdef WITH_INPUT_IME
3550 ui_textedit_ime_end(win, but);
3570 data->postbut = but;
3579 data->postbut = but;
3602 data->postbut = but;
3611 data->postbut = but;
3623 bool changed =
false, inbox =
false,
update =
false, skip_undo_push =
false;
3625 #ifdef WITH_INPUT_IME
3627 wmIMEData *ime_data = win->
ime_data;
3628 const bool is_ime_composing = ime_data && ime_data->is_ime_composing;
3630 const bool is_ime_composing =
false;
3633 switch (event->
type) {
3636 if (
data->searchbox) {
3637 #ifdef USE_KEYNAV_LIMIT
3657 if (
data->searchbox) {
3665 #ifdef WITH_INPUT_IME
3667 if (is_ime_composing) {
3671 data->cancel =
true;
3672 data->escapecancel =
true;
3687 if (
data->searchbox) {
3694 float mx =
event->xy[0];
3695 float my =
event->xy[1];
3701 data->sel_pos_init = but->
pos;
3706 else if (inbox ==
false) {
3708 if (
data->searchbox) {
3709 data->cancel =
data->escapecancel =
true;
3735 if (event->
val ==
KM_PRESS && !is_ime_composing) {
3736 switch (event->
type) {
3740 #if defined(__APPLE__)
3777 if (
data->searchbox) {
3778 #ifdef USE_KEYNAV_LIMIT
3794 if (
data->searchbox) {
3795 #ifdef USE_KEYNAV_LIMIT
3829 #if defined(__APPLE__)
3867 const bool is_redo = (
event->modifier &
KM_SHIFT);
3869 #
if defined(__APPLE__)
3875 data->undo_stack_text, is_redo ? 1 : -1, &undo_pos);
3876 if (undo_str !=
NULL) {
3880 but->
pos = undo_pos;
3886 skip_undo_push =
true;
3893 #ifdef WITH_INPUT_IME
3894 && !is_ime_composing && !WM_event_is_ime_switch(event)
3897 char utf8_buf_override[2] = {
'\0',
'\0'};
3898 const char *utf8_buf =
event->utf8_buf;
3904 utf8_buf_override[0] =
'.';
3905 utf8_buf = utf8_buf_override;
3923 #ifdef WITH_INPUT_IME
3932 strcmp(ime_data->str_result,
"\xE3\x80\x82") == 0) {
3951 if ((skip_undo_push ==
false) && (
data->undo_stack_text !=
NULL)) {
3964 if (
data->searchbox) {
3979 switch (event->
type) {
3981 int mx =
event->xy[0];
3982 int my =
event->xy[1];
4012 data->origvalue =
data->startvalue;
4046 float softrange = softmax - softmin;
4059 const float value_step_float_min = 0.1f;
4061 const double value_step = is_float ?
4065 const float softrange_max =
min_ff(
4067 2 * (is_float ?
min_ff(value_step, value_step_float_min) *
4068 (drag_map_softrange_max / value_step_float_min) :
4069 drag_map_softrange_max));
4071 if (softrange > softrange_max) {
4073 softmin =
data->origvalue - (softrange_max / 2);
4074 softmax =
data->origvalue + (softrange_max / 2);
4076 softmin = (
data->origvalue > 0.0f ? FLT_MAX : -FLT_MAX);
4079 softmax = (
data->origvalue > 0.0f ? FLT_MAX : -FLT_MAX);
4082 if (softmin < but->softmin) {
4084 softmax = softmin + softrange_max;
4086 else if (softmax > but->
softmax) {
4088 softmin = softmax - softrange_max;
4092 if (
UNLIKELY(softmin == softmax)) {
4093 if (
data->origvalue > 0.0) {
4094 softmin = nextafterf(softmin, -FLT_MAX);
4097 softmax = nextafterf(softmax, FLT_MAX);
4101 softrange = softmax - softmin;
4105 if (softrange == 0.0f) {
4106 data->dragfstart = 0.0f;
4109 switch (scale_type) {
4111 data->dragfstart = ((
float)
data->value - softmin) / softrange;
4116 const float base = softmax / log_min;
4121 const float cubic_min =
cube_f(softmin);
4122 const float cubic_max =
cube_f(softmax);
4123 const float cubic_range = cubic_max - cubic_min;
4124 const float f = ((
float)
data->value - softmin) * cubic_range / softrange + cubic_min;
4125 data->dragfstart = (cbrtf(f) - softmin) / softrange;
4132 data->drag_map_soft_min = softmin;
4133 data->drag_map_soft_max = softmax;
4136 data->dragchange =
false;
4137 data->draglock =
true;
4156 data->dragstartx = 0;
4157 data->draglastx = 0;
4158 data->dragchange =
false;
4165 if (
data->interactive) {
4210 switch (but->
type) {
4252 if (func || handlefunc) {
4258 else if (menufunc) {
4264 else if (popoverfunc) {
4271 #ifdef USE_ALLSELECT
4274 data->select_others.is_enabled =
true;
4305 return data->menu->direction;
4326 data->cancel =
true;
4349 int x =
event->xy[0],
y =
event->xy[1];
4357 xmax -= 0.2 * icon_size;
4366 if ((
x > (xmax - icon_size)) &&
x <= xmax) {
4409 if (op_icon->highlighted) {
4410 old_highlighted = op_icon;
4421 if (old_highlighted != hovered) {
4426 #ifdef USE_DRAG_TOGGLE
4435 data->dragstartx =
event->xy[0];
4436 data->dragstarty =
event->xy[1];
4444 data->applied =
false;
4454 #ifdef USE_DRAG_TOGGLE
4471 data->cancel =
true;
4484 data->cancel =
true;
4527 data->cancel =
true;
4529 data->escapecancel =
true;
4547 data->cancel =
true;
4555 data->cancel =
true;
4556 data->escapecancel =
true;
4587 data->cancel =
true;
4602 #ifdef USE_DRAG_TOGGLE
4622 if (event->
val == event_val) {
4688 #ifdef USE_DRAG_TOGGLE
4698 bool do_activate =
false;
4722 int type =
event->type;
4723 int val =
event->val;
4737 uiBut *but_other = (direction == -1) ? but_select->
next : but_select->
prev;
4741 data->cancel =
true;
4777 switch (event->
val) {
4784 data->dragstartx =
event->xy[0];
4785 data->dragstarty =
event->xy[1];
4793 data->cancel =
true;
4819 data->dragstartx =
event->xy[0];
4820 data->dragstarty =
event->xy[1];
4824 #ifdef USE_DRAG_TOGGLE
4827 data->dragstartx =
event->xy[0];
4828 data->dragstarty =
event->xy[1];
4884 if (tempf == softmin || tempf == softmax ||
snap ==
SNAP_OFF) {
4889 float softrange = softmax - softmin;
4915 if (softrange >= 21.0f) {
4927 switch (scale_type) {
4931 if (softrange < 2.10f) {
4932 tempf = roundf(tempf * 10.0f / snap_fac) * 0.1f * snap_fac;
4934 else if (softrange < 21.0f) {
4935 tempf = roundf(tempf / snap_fac) * snap_fac;
4938 tempf = roundf(tempf * 0.1f / snap_fac) * 10.0f * snap_fac;
4943 const float snap_fac =
powf(10.0f,
4946 tempf = roundf(tempf / snap_fac) * snap_fac;
4964 if (
ELEM(temp, softmin, softmax)) {
4972 temp = 10 * (temp / 10);
4975 temp = 100 * (temp / 100);
4985 const bool is_motion,
4992 bool changed =
false;
5004 const float softmin = but->
softmin;
5005 const float softmax = but->
softmax;
5006 const float softrange = softmax - softmin;
5017 switch (scale_type) {
5019 tempf = (
float)
data->startvalue + (
float)(mx -
data->dragstartx) * fac;
5023 const float startvalue =
max_ff((
float)
data->startvalue, log_min);
5024 tempf =
expf((
float)(mx -
data->dragstartx) * fac) * startvalue;
5025 if (tempf <= log_min) {
5031 tempf = cbrtf((
float)
data->startvalue) + (
float)(mx -
data->dragstartx) * fac;
5032 tempf *= tempf * tempf;
5040 switch (scale_type) {
5042 if (tempf < softmin) {
5043 data->dragstartx -= (softmin - tempf) / fac;
5046 else if (tempf > softmax) {
5047 data->dragstartx -= (softmax - tempf) / fac;
5053 if (tempf < log_min) {
5054 data->dragstartx -=
logf(log_min / (
float)
data->startvalue) / fac -
5058 else if (tempf > softmax) {
5059 data->dragstartx -=
logf(softmax / (
float)
data->startvalue) / fac -
5066 if (tempf < softmin) {
5067 data->dragstartx = mx - (int)((cbrtf(softmin) - cbrtf((
float)
data->startvalue)) / fac);
5070 else if (tempf > softmax) {
5071 data->dragstartx = mx - (int)((cbrtf(softmax) - cbrtf((
float)
data->startvalue)) / fac);
5078 CLAMP(tempf, softmin, softmax);
5081 if (tempf != (
float)
data->value) {
5082 data->dragchange =
true;
5083 data->value = tempf;
5088 if (softrange > 256) {
5091 else if (softrange > 32) {
5102 if (temp < softmin) {
5103 data->dragstartx -= (softmin - temp) / fac;
5106 else if (temp > softmax) {
5107 data->dragstartx += (temp - softmax) / fac;
5111 CLAMP(temp, softmin, softmax);
5114 if (temp !=
data->value) {
5115 data->dragchange =
true;
5121 data->draglastx = mx;
5125 const float softmin =
data->drag_map_soft_min;
5126 const float softmax =
data->drag_map_soft_max;
5127 const float softrange = softmax - softmin;
5129 float non_linear_range_limit;
5130 float non_linear_pixel_map;
5131 float non_linear_scale;
5138 non_linear_range_limit = 11.0f;
5139 non_linear_pixel_map = 500.0f;
5143 non_linear_range_limit = 129.0f;
5145 non_linear_pixel_map = 250.0f;
5148 if (softrange > 600) {
5149 deler =
powf(softrange, 0.75f);
5151 else if (softrange < 25) {
5154 else if (softrange < 100) {
5160 if (softrange > non_linear_range_limit) {
5161 non_linear_scale = (
float)
abs(mx -
data->dragstartx) / non_linear_pixel_map;
5164 non_linear_scale = 1.0f;
5167 if (is_float ==
false) {
5172 data->dragf += (((
float)(mx -
data->draglastx)) / deler) * non_linear_scale;
5174 if (but->
softmin == softmin) {
5177 if (but->
softmax == softmax) {
5181 data->draglastx = mx;
5183 switch (scale_type) {
5185 tempf = (softmin +
data->dragf * softrange);
5191 const float base = softmax / log_min;
5192 tempf =
powf(base,
data->dragf) * log_min;
5193 if (tempf <= log_min) {
5199 tempf = (softmin +
data->dragf * softrange);
5200 tempf *= tempf * tempf;
5201 float cubic_min = softmin * softmin * softmin;
5202 float cubic_max = softmax * softmax * softmax;
5203 tempf = (tempf - cubic_min) / (cubic_max - cubic_min) * softrange + softmin;
5214 lvalue = (int)
data->value;
5216 if (temp != lvalue) {
5217 data->dragchange =
true;
5228 if (tempf != (
float)
data->value) {
5229 data->dragchange =
true;
5230 data->value = tempf;
5250 if (
data->dragchange ==
false) {
5255 int mx =
data->window->eventstate->xy[0];
5256 int my =
data->window->eventstate->xy[1];
5259 if (mx < (but->
rect.
xmin + handle_width)) {
5262 else if (mx > (but->
rect.
xmax - handle_width)) {
5270 if (
data->changed_cursor) {
5272 data->changed_cursor =
false;
5276 if (
data->changed_cursor ==
false) {
5278 data->changed_cursor =
true;
5296 int mx =
event->xy[0];
5297 int my =
event->xy[1];
5299 const int screen_mx =
event->xy[0];
5307 int type =
event->type, val =
event->val;
5350 #ifdef USE_DRAG_MULTINUM
5358 data->cancel =
true;
5359 data->escapecancel =
true;
5364 if (
data->dragchange) {
5365 #ifdef USE_DRAG_MULTINUM
5367 if (
data->multi_data.init == BUTTON_MULTI_INIT_SETUP) {
5381 const bool is_motion = (
event->type ==
MOUSEMOVE);
5385 #ifdef USE_DRAG_MULTINUM
5386 data->multi_data.drag_dir[0] +=
abs(
data->draglastx - mx);
5387 data->multi_data.drag_dir[1] +=
abs(
data->draglasty - my);
5403 #ifdef USE_DRAG_MULTINUM
5404 else if (
data->multi_data.has_mbuts) {
5405 if (
data->multi_data.init == BUTTON_MULTI_INIT_ENABLE) {
5431 const int value_step = (int)number_but->
step_size;
5436 (
double)
max_ii(softmin, (
int)
data->value - value_step) :
5438 if (value_test !=
data->value) {
5442 data->cancel =
true;
5459 value_step =
powf(10.0f,
5469 (
float)(
data->value - value_step)) :
5471 (
float)(
data->value + value_step));
5472 if (value_test !=
data->value) {
5473 data->value = value_test;
5476 data->cancel =
true;
5488 data->draglastx = mx;
5489 data->draglasty = my;
5497 const bool is_horizontal,
5498 const bool is_motion,
5502 float cursor_x_range, f, tempf, softmin, softmax, softrange;
5504 bool changed =
false;
5519 softrange = softmax - softmin;
5538 f = (mx_fl -
data->dragstartx) / cursor_x_range +
data->dragfstart;
5539 CLAMP(f, 0.0f, 1.0f);
5542 #ifdef USE_CONT_MOUSE_CORRECT
5545 if (is_horizontal) {
5546 data->ungrab_mval[0] = but->
rect.
xmin + (f * cursor_x_range);
5550 data->ungrab_mval[1] = but->
rect.
ymin + (f * cursor_x_range);
5558 switch (scale_type) {
5560 tempf = softmin + f * softrange;
5564 tempf =
powf(softmax / softmin, f) * softmin;
5568 const float cubicmin =
cube_f(softmin);
5569 const float cubicmax =
cube_f(softmax);
5570 const float cubicrange = cubicmax - cubicmin;
5571 tempf =
cube_f(softmin + f * softrange);
5572 tempf = (tempf - cubicmin) / cubicrange * softrange + softmin;
5579 if (
ELEM(tempf, softmin, softmax)) {
5585 if (
ELEM(tempf, softmin, softmax)) {
5587 else if (softrange < 2.10f) {
5588 tempf = roundf(tempf * 100.0f) * 0.01f;
5590 else if (softrange < 21.0f) {
5591 tempf = roundf(tempf * 10.0f) * 0.1f;
5594 tempf = roundf(tempf);
5598 if (softrange < 2.10f) {
5599 tempf = roundf(tempf * 10.0f) * 0.1f;
5601 else if (softrange < 21.0f) {
5602 tempf = roundf(tempf);
5605 tempf = roundf(tempf * 0.1f) * 10.0f;
5610 temp = 10 * (temp / 10);
5616 lvalue = round(
data->value);
5618 CLAMP(temp, softmin, softmax);
5620 if (temp != lvalue) {
5622 data->dragchange =
true;
5627 CLAMP(tempf, softmin, softmax);
5629 if (tempf != (
float)
data->value) {
5630 data->value = tempf;
5631 data->dragchange =
true;
5645 int mx =
event->xy[0];
5646 int my =
event->xy[1];
5650 int type =
event->type, val =
event->val;
5674 #ifndef USE_ALLSELECT
5689 data->dragstartx = mx;
5690 data->draglastx = mx;
5704 #ifdef USE_DRAG_MULTINUM
5711 data->cancel =
true;
5712 data->escapecancel =
true;
5717 if (
data->dragchange) {
5718 #ifdef USE_DRAG_MULTINUM
5720 if (
data->multi_data.init == BUTTON_MULTI_INIT_SETUP) {
5730 #ifdef USE_CONT_MOUSE_CORRECT
5738 const bool is_motion = (
event->type ==
MOUSEMOVE);
5739 #ifdef USE_DRAG_MULTINUM
5740 data->multi_data.drag_dir[0] +=
abs(
data->draglastx - mx);
5741 data->multi_data.drag_dir[1] +=
abs(
data->draglasty - my);
5753 #ifdef USE_DRAG_MULTINUM
5754 else if (
data->multi_data.has_mbuts) {
5755 if (
data->multi_data.init == BUTTON_MULTI_INIT_ENABLE) {
5777 float f, tempf, softmin, softmax, softrange;
5784 softrange = softmax - softmin;
5786 tempf =
data->value;
5787 temp = (int)
data->value;
5801 f =
powf(softmax / softmin, f) * softmin;
5804 f = softmin + f * softrange;
5816 if (temp >= softmin && temp <= softmax) {
5820 data->cancel =
true;
5824 if (tempf >= softmin && tempf <= softmax) {
5834 tempf -= value_step;
5837 tempf += value_step;
5840 CLAMP(tempf, softmin, softmax);
5841 data->value = tempf;
5844 data->cancel =
true;
5858 data->draglastx = mx;
5859 data->draglasty = my;
5870 int mx =
event->xy[0];
5871 int my =
event->xy[1];
5878 data->dragstartx = mx;
5879 data->draglastx = mx;
5882 data->dragstartx = my;
5883 data->draglastx = my;
5893 data->cancel =
true;
5894 data->escapecancel =
true;
5902 const bool is_motion = (
event->type ==
MOUSEMOVE);
5904 but,
data, (horizontal) ? mx : my, horizontal, is_motion,
false,
false)) {
5931 int mx =
event->xy[0];
5932 int my =
event->xy[1];
5938 data->dragstartx =
event->xy[0];
5939 data->dragstarty =
event->xy[1];
5948 data->cancel =
true;
5949 data->escapecancel =
true;
5957 int dragstartx =
data->dragstartx;
5958 int dragstarty =
data->dragstarty;
5960 data->value =
data->origvalue + (horizontal ? mx - dragstartx : dragstarty - my);
6002 data->dragstartx =
event->xy[0];
6003 data->dragstarty =
event->xy[1];
6007 #ifdef USE_DRAG_TOGGLE
6010 data->dragstartx =
event->xy[0];
6011 data->dragstarty =
event->xy[1];
6023 int type =
event->type;
6024 int val =
event->val;
6050 data->postbut = but;
6077 data->cancel =
true;
6094 bool changed =
true;
6102 float *fp =
data->origvec;
6104 const float radsq = rad * rad;
6108 mdx = (rad * fp[0]);
6109 mdy = (rad * fp[1]);
6111 else if (fp[2] > -1.0f) {
6112 mrad = rad /
sqrtf(fp[0] * fp[0] + fp[1] * fp[1]);
6114 mdx = 2.0f * mrad * fp[0] - (rad * fp[0]);
6115 mdy = 2.0f * mrad * fp[1] - (rad * fp[1]);
6121 float dx = (
float)(mx + mdx -
data->dragstartx);
6122 float dy = (
float)(my + mdy -
data->dragstarty);
6125 mrad = dx * dx + dy * dy;
6129 fp[2] =
sqrtf(radsq - dx * dx - dy * dy);
6133 mrad = rad /
sqrtf(mrad);
6135 dx *= (2.0f * mrad - 1.0f);
6136 dy *= (2.0f * mrad - 1.0f);
6138 mrad = dx * dx + dy * dy;
6142 fp[2] = -
sqrtf(radsq - dx * dx - dy * dy);
6148 const int snap_steps = (
snap ==
SNAP_ON) ? 4 : 12;
6149 const float snap_steps_angle =
M_PI / snap_steps;
6150 float angle, angle_snap;
6154 for (
int i = 0; i < 3; i++) {
6156 angle_snap = roundf((
angle / snap_steps_angle)) * snap_steps_angle;
6157 fp[i] =
sinf(angle_snap);
6163 data->draglastx = mx;
6164 data->draglasty = my;
6189 data->dragstartx =
event->xy[0];
6190 data->dragstarty =
event->xy[1];
6194 #ifdef USE_DRAG_TOGGLE
6198 data->dragstartx =
event->xy[0];
6199 data->dragstarty =
event->xy[1];
6211 float hsv_static[3] = {0.0f};
6219 hsv[2] =
clamp_f(hsv[2] - 0.05f, 0.0f, 1.0f);
6222 hsv[2] =
clamp_f(hsv[2] + 0.05f, 0.0f, 1.0f);
6225 const float fac = 0.005 * (
event->xy[1] -
event->prev_xy[1]);
6226 hsv[2] =
clamp_f(hsv[2] + fac, 0.0f, 1.0f);
6262 data->cancel =
true;
6271 if (paint !=
NULL) {
6287 bool updated =
false;
6331 int mx =
event->xy[0];
6332 int my =
event->xy[1];
6338 data->dragstartx = mx;
6339 data->dragstarty = my;
6340 data->draglastx = mx;
6341 data->draglasty = my;
6363 data->cancel =
true;
6364 data->escapecancel =
true;
6382 const float v_max =
max_fff(
v[0],
v[1],
v[2]);
6446 const bool changed =
true;
6450 #ifdef USE_CONT_MOUSE_CORRECT
6453 data->ungrab_mval[0] = mx_fl;
6454 data->ungrab_mval[1] = my_fl;
6467 float xpos, ypos, hsvo[3];
6482 mx_fl = xpos - (
data->dragstartx - mx_fl);
6483 my_fl = ypos - (
data->dragstarty - my_fl);
6545 data->draglastx = mx;
6546 data->draglasty = my;
6551 #ifdef WITH_INPUT_NDOF
6552 static void ui_ndofedit_but_HSVCUBE(
uiButHSVCube *hsv_but,
6554 const wmNDOFMotionData *ndof,
6562 const float sensitivity = (shift ? 0.15f : 0.3f) * ndof->dt;
6570 hsv[1] += ndof->rvec[2] * sensitivity;
6571 hsv[2] += ndof->rvec[0] * sensitivity;
6574 hsv[0] += ndof->rvec[2] * sensitivity;
6575 hsv[2] += ndof->rvec[0] * sensitivity;
6578 hsv[0] += ndof->rvec[2] * sensitivity;
6579 hsv[1] += ndof->rvec[0] * sensitivity;
6582 hsv[0] += ndof->rvec[2] * sensitivity;
6585 hsv[1] += ndof->rvec[2] * sensitivity;
6588 hsv[2] += ndof->rvec[2] * sensitivity;
6595 hsv[2] += ndof->rvec[0] * sensitivity;
6625 int mx =
event->xy[0];
6626 int my =
event->xy[1];
6633 data->dragstartx = mx;
6634 data->dragstarty = my;
6635 data->draglastx = mx;
6636 data->draglasty = my;
6646 #ifdef WITH_INPUT_NDOF
6648 const wmNDOFMotionData *ndof =
event->customdata;
6668 float rgb[3], def_hsv[3];
6679 def_hsv[0] = hsv[0];
6680 def_hsv[1] = hsv[1];
6694 data->cancel =
true;
6695 data->escapecancel =
true;
6725 const bool changed =
true;
6732 #ifdef USE_CONT_MOUSE_CORRECT
6735 data->ungrab_mval[0] = mx_fl;
6736 data->ungrab_mval[1] = my_fl;
6760 if (hsv[2] == 0.0f) {
6765 if (hsv[2] == 0.0f) {
6768 if (hsv[2] >= 0.9999f) {
6776 float xpos, ypos, hsvo[3], rgbo[3];
6787 mx_fl = xpos - (
data->dragstartx - mx_fl);
6788 my_fl = ypos - (
data->dragstarty - my_fl);
6794 hsv[1] = 1.0f -
sqrt3f(1.0f - hsv[1]);
6812 data->draglastx = mx;
6813 data->draglasty = my;
6818 #ifdef WITH_INPUT_NDOF
6819 static void ui_ndofedit_but_HSVCIRCLE(
uiBut *but,
6821 const wmNDOFMotionData *ndof,
6828 float phi,
r ,
v[2];
6829 const float sensitivity = (shift ? 0.06f : 0.3f) * ndof->dt;
6845 v[0] += ndof->rvec[2] * sensitivity;
6846 v[1] += ndof->rvec[0] * sensitivity;
6852 phi += ndof->rvec[1] * sensitivity * 0.5f;
6863 if (hsv[2] == 0.0f) {
6868 if (hsv[2] == 0.0f) {
6871 if (hsv[2] == 1.0f) {
6901 int mx =
event->xy[0];
6902 int my =
event->xy[1];
6908 data->dragstartx = mx;
6909 data->dragstarty = my;
6910 data->draglastx = mx;
6911 data->draglasty = my;
6921 #ifdef WITH_INPUT_NDOF
6924 const wmNDOFMotionData *ndof =
event->customdata;
6942 float rgb[3], def_hsv[3];
6944 def =
MEM_callocN(
sizeof(
float) *
len,
"reset_defaults - float");
6952 def_hsv[0] = hsv[0];
6953 def_hsv[2] = hsv[2];
6968 data->cancel =
true;
6969 data->escapecancel =
true;
6975 hsv[2] =
clamp_f(hsv[2] - 0.05f, 0.0f, 1.0f);
6980 hsv[2] =
clamp_f(hsv[2] + 0.05f, 0.0f, 1.0f);
7004 bool changed =
false;
7006 if (
data->draglastx == mx) {
7010 if (
data->coba->tot == 0) {
7015 data->dragcbd->pos += dx;
7021 data->draglastx = mx;
7030 int mx =
event->xy[0];
7031 int my =
event->xy[1];
7049 data->dragstartx = mx;
7050 data->dragstarty = my;
7051 data->draglastx = mx;
7052 data->draglasty = my;
7056 for (
a = 0, cbd = coba->
data; a < coba->tot;
a++, cbd++) {
7058 xco =
abs(xco - mx);
7059 if (
a == coba->
cur) {
7063 if (xco < mindist) {
7070 data->dragfstart =
data->dragcbd->pos;
7079 if (mx !=
data->draglastx || my !=
data->draglasty) {
7090 data->dragcbd->pos =
data->dragfstart;
7092 data->cancel =
true;
7093 data->escapecancel =
true;
7114 bool changed =
false;
7121 int dragx =
data->draglastx;
7122 int dragy =
data->draglasty;
7131 d[0] = mx -
data->dragstartx;
7132 d[1] = my -
data->dragstarty;
7139 float fx = (mx - dragx) / zoomx;
7140 float fy = (my - dragy) / zoomy;
7142 if (
data->dragsel != -1) {
7145 bool moved_point =
false;
7150 for (
int a = 0;
a < cuma->totpoint;
a++) {
7152 const float origx = cmp[
a].x, origy = cmp[
a].y;
7156 cmp[
a].x = 0.125f * roundf(8.0f * cmp[
a].
x);
7157 cmp[
a].y = 0.125f * roundf(8.0f * cmp[
a].
y);
7159 if (cmp[
a].
x != origx || cmp[
a].
y != origy) {
7170 data->draglastx = evtx;
7171 data->draglasty = evty;
7174 #ifdef USE_CONT_MOUSE_CORRECT
7186 data->dragchange =
true;
7191 if (cumap->
curr.
xmin - fx < cumap->clipr.xmin) {
7197 if (cumap->
curr.
ymin - fy < cumap->clipr.ymin) {
7210 data->draglastx = evtx;
7211 data->draglasty = evty;
7222 bool changed =
false;
7226 int mx =
event->xy[0];
7227 int my =
event->xy[1];
7234 const float m_xy[2] = {mx, my};
7235 float dist_min_sq =
square_f(
U.dpi_fac * 14.0f);
7249 for (
int a = 0;
a < cuma->totpoint;
a++) {
7253 if (dist_sq < dist_min_sq) {
7255 dist_min_sq = dist_sq;
7260 float f_xy[2], f_xy_prev[2];
7269 dist_min_sq =
square_f(
U.dpi_fac * 8.0f);
7272 for (
int i = 1; i <=
CM_TABLE; i++) {
7289 for (
int a = 0;
a < cuma->totpoint;
a++) {
7290 if (cmp[
a].
x == f_xy[0]) {
7303 for (
int a = 0;
a < cuma->totpoint;
a++) {
7314 data->cancel =
true;
7317 data->dragsel = sel;
7319 data->dragstartx =
event->xy[0];
7320 data->dragstarty =
event->xy[1];
7321 data->draglastx =
event->xy[0];
7322 data->draglasty =
event->xy[1];
7330 if (event->xy[0] !=
data->draglastx || event->xy[1] !=
data->draglasty) {
7344 if (
data->dragsel != -1) {
7349 if (
data->dragchange ==
false) {
7351 if ((event->modifier &
KM_SHIFT) == 0) {
7352 for (
int a = 0;
a < cuma->totpoint;
a++) {
7387 bool changed =
false;
7394 int dragx =
data->draglastx;
7395 int dragy =
data->draglasty;
7402 const float d[2] = {mx -
data->dragstartx,
data->dragstarty};
7408 float fx = (mx - dragx) / zoomx;
7409 float fy = (my - dragy) / zoomy;
7411 if (
data->dragsel != -1) {
7412 float last_x, last_y;
7414 bool moved_point =
false;
7420 const float delta[2] = {fx, fy};
7432 last_x = pts[
a].h1_loc[0];
7433 last_y = pts[
a].h1_loc[1];
7437 last_x = pts[
a].h2_loc[0];
7438 last_y = pts[
a].h2_loc[1];
7446 data->draglastx = evtx;
7447 data->draglasty = evty;
7449 #ifdef USE_CONT_MOUSE_CORRECT
7460 data->dragchange =
true;
7465 if (profile->
view_rect.
xmin - fx < profile->clip_rect.xmin) {
7471 if (profile->
view_rect.
ymin - fy < profile->clip_rect.ymin) {
7484 data->draglastx = evtx;
7485 data->draglasty = evty;
7511 int mx = event->
xy[0];
7512 int my = event->
xy[1];
7518 data->dragstartx = mx;
7519 data->dragstarty = my;
7520 data->draglastx = mx;
7521 data->draglasty = my;
7537 const float m_xy[2] = {mx, my};
7549 float dist_min_sq =
square_f(
U.dpi_fac * 14.0f);
7550 int i_selected = -1;
7551 short selection_type = 0;
7552 for (
int i = 0; i < profile->
path_len; i++) {
7556 if (dist_sq < dist_min_sq) {
7559 dist_min_sq = dist_sq;
7567 if (dist_sq < dist_min_sq) {
7570 dist_min_sq = dist_sq;
7576 if (dist_sq < dist_min_sq) {
7579 dist_min_sq = dist_sq;
7586 if (i_selected == -1) {
7587 float f_xy[2], f_xy_prev[2];
7591 dist_min_sq =
square_f(
U.dpi_fac * 8.0f);
7605 i_selected = (int)(new_pt - profile->
path);
7606 BLI_assert(i_selected >= 0 && i_selected <= profile->path_len);
7614 if (i_selected != -1) {
7617 pts[i_selected].
flag ^= selection_type;
7620 for (
int i = 0; i < profile->
path_len; i++) {
7624 profile->
path[i_selected].
flag |= selection_type;
7629 data->cancel =
true;
7632 data->dragsel = i_selected;
7634 data->dragstartx = mx;
7635 data->dragstarty = my;
7636 data->draglastx = mx;
7637 data->draglasty = my;
7645 if (mx !=
data->draglastx || my !=
data->draglasty) {
7654 if (
data->dragsel != -1) {
7656 if (
data->dragchange ==
false) {
7675 const bool changed =
true;
7676 const float dy = my -
data->draglasty;
7680 hist->
ymax += (dy * 0.1f) * yfac;
7685 data->draglastx = mx;
7686 data->draglasty = my;
7694 int mx =
event->xy[0];
7695 int my =
event->xy[1];
7700 data->dragstartx = mx;
7701 data->dragstarty = my;
7702 data->draglastx = mx;
7703 data->draglasty = my;
7725 data->cancel =
true;
7726 data->escapecancel =
true;
7731 if (mx !=
data->draglastx || my !=
data->draglasty) {
7749 const bool changed =
true;
7751 const float dy = my -
data->draglasty;
7758 data->draglastx = mx;
7759 data->draglasty = my;
7767 int mx =
event->xy[0];
7768 int my =
event->xy[1];
7773 data->dragstartx = mx;
7774 data->dragstarty = my;
7775 data->draglastx = mx;
7776 data->draglasty = my;
7798 data->cancel =
true;
7799 data->escapecancel =
true;
7804 if (mx !=
data->draglastx || my !=
data->draglasty) {
7823 const bool changed =
true;
7825 float dx = mx -
data->draglastx;
7826 float dy = my -
data->draglasty;
7849 data->draglastx = mx;
7850 data->draglasty = my;
7858 int mx =
event->xy[0];
7859 int my =
event->xy[1];
7864 data->dragstartx = mx;
7865 data->dragstarty = my;
7866 data->draglastx = mx;
7867 data->draglasty = my;
7881 data->cancel =
true;
7882 data->escapecancel =
true;
7887 if (mx !=
data->draglastx || my !=
data->draglasty) {
7918 bool is_press_ctrl_but_no_shift = (
event->val ==
KM_PRESS) &&
7921 const bool do_copy =
event->type ==
EVT_CKEY && is_press_ctrl_but_no_shift;
7922 const bool do_paste =
event->type ==
EVT_VKEY && is_press_ctrl_but_no_shift;
7989 switch (but->
type) {
8103 #ifdef USE_DRAG_MULTINUM
8108 (
data->multi_data.init == BUTTON_MULTI_INIT_SETUP)) {
8112 if (
data->multi_data.init == BUTTON_MULTI_INIT_UNSET) {
8119 const float dir_nor_y[2] = {0.0, 1.0f};
8120 float dir_nor_drag[2];
8125 data->multi_data.init = BUTTON_MULTI_INIT_SETUP;
8126 data->multi_data.drag_lock_x =
event->xy[0];
8129 data->multi_data.init = BUTTON_MULTI_INIT_DISABLE;
8133 else if (
data->multi_data.init == BUTTON_MULTI_INIT_SETUP) {
8139 ((
abs(
data->multi_data.drag_lock_x - event->
xy[0]) > margin_x) &&
8142 if (
data->multi_data.has_mbuts) {
8144 data->multi_data.init = BUTTON_MULTI_INIT_ENABLE;
8147 data->multi_data.init = BUTTON_MULTI_INIT_DISABLE;
8152 if (
data->multi_data.init == BUTTON_MULTI_INIT_SETUP) {
8179 block->tooltipdisabled = !enable;
8198 if (
data->autoopentimer) {
8210 bContext *
C,
ARegion *region,
int *pass,
double *r_pass_delay,
bool *r_exit_on_event)
8212 bool is_label =
false;
8220 *r_exit_on_event =
false;
8292 if (
data->used_mouse && !
data->autoopentimer) {
8300 time = 5 *
U.menuthreshold2;
8303 time = 5 *
U.menuthreshold1;
8348 "Can't edit driven number value, see graph editor for the driver setup.");
8354 #ifdef USE_CONT_MOUSE_CORRECT
8357 int mouse_ungrab_xy[2];
8360 mouse_ungrab_xy[0] =
data->ungrab_mval[0];
8361 mouse_ungrab_xy[1] =
data->ungrab_mval[1];
8385 else if (
data->flashtimer) {
8395 else if (
data->hold_action_timer) {
8464 data->region = region;
8466 #ifdef USE_CONT_MOUSE_CORRECT
8475 data->interactive =
true;
8496 data->used_mouse =
true;
8504 if (
data->menu &&
data->menu->region) {
8565 #ifdef USE_DRAG_MULTINUM
8566 if (
data->multi_data.has_mbuts) {
8571 if (!
data->cancel) {
8585 if (!
data->cancel ||
data->escapecancel) {
8594 if (!onfree && !
data->cancel) {
8599 #ifdef USE_ALLSELECT
8602 uiBut but_temp = *but;
8604 for (
int i = 0; i < selctx_data->
elems_len; i++) {
8617 if (
U.runtime.is_dirty ==
false) {
8628 block_iter->tooltipdisabled =
true;
8637 if (
data->origstr) {
8641 #ifdef USE_ALLSELECT
8645 if (
data->changed_cursor) {
8654 if (
data->custom_interaction_handle !=
NULL) {
8657 data->custom_interaction_handle->user_count--;
8660 if (
data->custom_interaction_handle->user_count == 0) {
8664 data->custom_interaction_handle =
NULL;
8692 data->cancel =
true;
8716 active_but_override = but;
8719 active_but_real = but;
8722 active_but_last = but;
8727 uiBut *activebut = active_but_override;
8729 activebut = active_but_real;
8732 activebut = active_but_last;
8735 if (activebut && (but_check_cb ==
NULL || but_check_cb(activebut))) {
8738 but_found = activebut;
8741 if (
data &&
data->menu && (region !=
data->menu->region)) {
8742 region =
data->menu->region;
8807 memset(r_ptr, 0,
sizeof(*r_ptr));
8844 if (region_ctx ==
NULL) {
8850 if (block->ui_operator) {
8851 return block->ui_operator;
8860 if (region == region_ctx) {
8864 if (block->ui_operator) {
8865 return block->ui_operator;
8915 region =
data->menu->region;
8931 if (!active_but || !active_but->
active || !active_but->
changed || active_but->
block != block) {
8937 if (
data->searchbox) {
8965 const bool labeledit =
event->modifier &
KM_CTRL;
8969 const bool for_tooltip =
true;
9007 event.customdata = but;
9008 event.customdata_free =
false;
9028 *active_back = but->
active;
9032 data->region = region;
9047 but->
active = active_back;
9058 data->cancel =
true;
9084 printf(
"%s: error, unhandled type: %u\n", __func__, but->
type);
9102 double default_value;
9123 *r_value = default_value;
9141 switch (event->
type) {
9144 data->cancel =
true;
9147 #ifdef USE_UI_POPOVER_ONCE
9153 data->cancel =
false;
9187 data->cancel =
true;
9230 switch (event->
type) {
9232 data->cancel =
true;
9239 data->cancel =
true;
9260 if (
data->hold_action_timer) {
9275 data->cancel =
false;
9282 data->cancel =
true;
9297 switch (event->
type) {
9310 switch (event->
type) {
9314 if (
data->menu &&
data->menu->region) {
9324 data->cancel =
true;
9356 if ((
data->cancel ==
false) && (
data->str !=
NULL) && (
data->str[0] ==
'\0') &&
9361 #ifdef USE_DRAG_MULTINUM
9362 if (
data->multi_data.mbuts) {
9366 double default_value;
9373 data->multi_data.skip =
true;
9416 bool activate_dragging)
9439 if (activate_dragging && do_drag) {
9440 ((
uiList *)ui_list)->dyn_data->custom_activate_optype =
NULL;
9447 ((
uiList *)ui_list)->dyn_data->custom_activate_optype = custom_activate_optype;
9486 bool activate_dragging =
false;
9490 activate_dragging =
true;
9513 if (new_active_row) {
9555 int type =
event->type, val =
event->val;
9557 bool redraw =
false;
9560 if (!ui_list || !ui_list->
dyn_data) {
9565 int mx =
event->xy[0];
9566 int my =
event->xy[1];
9605 int current_idx = -1;
9608 for (
int i = 0; i <
len; i++) {
9611 org_order[new_order ? new_order[++org_idx] : ++org_idx] = i;
9613 current_idx = new_order ? new_order[org_idx] : org_idx;
9616 else if (i == value && org_idx >= 0) {
9617 current_idx = -(new_order ? new_order[org_idx] : org_idx) - 1;
9624 if (current_idx < 0) {
9625 current_idx = (current_idx * -1) + (inc < 0 ? inc : inc - 1);
9631 value = org_order[current_idx];
9643 if (value != value_orig) {
9682 bool has_view_item =
false;
9692 has_view_item =
true;
9697 if (!has_view_item) {
9705 if (hovered_row_but) {
9743 if (
data->interactive) {
9756 data->cancel =
true;
9772 data->cancel =
true;
9829 const bool use_wiggle_room)
9844 }
while ((region = region->
next));
9853 const float newp[2] = {
xy[0],
xy[1]};
9866 const float p1[2] = {rect_px.
xmin - margin, rect_px.
ymin - margin};
9867 const float p2[2] = {rect_px.
xmax + margin, rect_px.
ymin - margin};
9868 const float p3[2] = {rect_px.
xmax + margin, rect_px.
ymax + margin};
9869 const float p4[2] = {rect_px.
xmin - margin, rect_px.
ymax + margin};
9873 if (use_wiggle_room) {
9898 #ifdef USE_KEYNAV_LIMIT
9950 float ymax = -FLT_MAX;
9952 ymax =
max_ff(ymax, bt->rect.ymax);
9955 dy = block->
rect.
ymax - ymax - scroll_pad;
9960 float ymin = FLT_MAX;
9962 ymin =
min_ff(ymin, bt->rect.ymin);
9965 dy = block->
rect.
ymin - ymin + scroll_pad;
9974 bt->rect.ymin += dy;
9975 bt->rect.ymax += dy;
10013 else if (test ==
'b') {
10026 if (scroll_dir == 1) {
10032 else if (scroll_dir == -1) {
10055 block->auto_open =
false;
10073 if ((level != 0) && (but ==
NULL)) {
10156 if (
len <
U.pie_menu_threshold *
U.dpi_fac) {
10170 const bool is_parent_inside,
10171 const bool is_parent_menu,
10172 const bool is_floating)
10180 int mx =
event->xy[0];
10181 int my =
event->xy[1];
10187 const bool inside_title = inside && ((my + (
UI_UNIT_Y * 1.5f)) > block->
rect.
ymax);
10192 #ifdef USE_DRAG_POPUP
10251 switch (event->
type) {
10259 if (inside ==
false) {
10322 const float dy =
event->xy[1] -
event->prev_xy[1];
10343 const int scroll_dir = (
event->type ==
WHEELUPMOUSE) ? 1 : -1;
10366 int type =
event->type;
10367 int val =
event->val;
10396 #ifdef USE_KEYNAV_LIMIT
10631 if ((inside ==
false) && (menu->
menuretval == 0)) {
10646 &saferct->
parent, (
float)event->
xy[0], (
float)event->
xy[1])) {
10670 #ifdef USE_KEYNAV_LIMIT
10697 if (but_active ==
NULL) {
10702 #ifdef USE_DRAG_POPUP
10704 (inside && is_floating && inside_title)) {
10768 #ifdef USE_UI_POPOVER_ONCE
10858 if (!force_close) {
10943 float event_xy[2] = {
UNPACK2(event->
xy)};
10957 if (duration > 0.01 *
U.pie_initial_timeout) {
10963 const double final_time = 0.01 *
U.pie_animation_timeout;
10964 float fac = duration / final_time;
10965 const float pie_radius =
U.pie_menu_radius *
UI_DPI_FAC;
10979 center[0] = (vec[0] > 0.01f) ? 0.5f : ((vec[0] < -0.01f) ? -0.5f : 0.0f);
10980 center[1] = (vec[1] > 0.99f) ? 0.5f : ((vec[1] < -0.99f) ? -0.5f : 0.0f);
11010 if (len_sq < 1.0f) {
11032 if ((duration < 0.01 *
U.pie_tap_timeout) &&
11039 if (but && (
U.pie_menu_confirm > 0) &&
11040 (dist >=
U.dpi_fac * (
U.pie_menu_threshold +
U.pie_menu_confirm))) {
11052 switch (event->
type) {
11054 if (!is_click_style) {
11064 if ((
U.pie_menu_confirm > 0) &&
11065 (dist >=
U.dpi_fac * (
U.pie_menu_threshold +
U.pie_menu_confirm))) {
11079 if (is_click_style) {
11131 #define CASE_NUM_TO_DIR(n, d) \
11132 case (EVT_ZEROKEY + n): \
11133 case (EVT_PAD0 + n): { \
11134 if (num_dir == UI_RADIAL_NONE) { \
11160 #undef CASE_NUM_TO_DIR
11175 const bool is_parent_inside,
11176 const bool is_parent_menu,
11177 const bool is_floating)
11180 bool do_towards_reinit =
false;
11190 bool inside =
false;
11196 if (do_recursion) {
11197 if (is_parent_inside ==
false) {
11198 int mx =
event->xy[0];
11199 int my =
event->xy[1];
11205 C, event, submenu, level + 1, is_parent_inside || inside, is_menu,
false);
11212 if (submenu && submenu->menuretval) {
11225 if (do_but_search) {
11234 do_towards_reinit =
true;
11246 bool handled =
false;
11251 retval = retval_test;
11256 if (handled ==
false) {
11258 C, event, menu, level, is_parent_inside, is_parent_menu, is_floating);
11264 if (do_towards_reinit) {
11346 if (region ==
NULL) {
11352 if (screen ==
NULL) {
11413 if (
data->menu &&
data->menu->menuretval) {
11465 bool reset_pie =
false;
11502 #ifdef USE_DRAG_TOGGLE
11611 const void *rna_poin_data,
11612 const char *rna_prop_id)
11622 block_text = block;
11650 block_text = block;
11753 const bool is_click)
11758 int unique_retval_ids_len = 0;
11761 unique_retval_ids_len++;
11765 int *unique_retval_ids =
MEM_mallocN(
sizeof(*unique_retval_ids) * unique_retval_ids_len,
11767 unique_retval_ids_len = 0;
11770 unique_retval_ids[unique_retval_ids_len++] = but->
retval;
11774 if (unique_retval_ids_len > 1) {
11777 unique_retval_ids_len);
11779 sizeof(*unique_retval_ids) * unique_retval_ids_len);
11788 return interaction;
11823 const bool is_click)
11825 if (
data->custom_interaction_handle) {
11834 data->custom_interaction_handle = interaction;
typedef float(TangentPoint)[2]
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time)
void BKE_brush_color_set(struct Scene *scene, struct Brush *brush, const float color[3])
struct CBData * BKE_colorband_element_add(struct ColorBand *coba, float position)
void BKE_colorband_update_sort(struct ColorBand *coba)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
void CTX_store_set(bContext *C, bContextStore *store)
void CTX_wm_region_set(bContext *C, struct ARegion *region)
struct ARegion * CTX_wm_menu(const bContext *C)
void CTX_wm_menu_set(bContext *C, struct ARegion *menu)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
bContextStore * CTX_store_copy(bContextStore *store)
void CTX_store_free(bContextStore *store)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct MovieClip * CTX_data_edit_movieclip(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct ReportList * CTX_wm_reports(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
void CTX_wm_area_set(bContext *C, struct ScrArea *area)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
@ PROF_UPDATE_REMOVE_DOUBLES
bool BKE_curveprofile_move_point(struct CurveProfile *profile, struct CurveProfilePoint *point, bool snap, const float delta[2])
void BKE_curveprofile_update(struct CurveProfile *profile, int update_flags)
void BKE_curveprofile_copy_data(struct CurveProfile *target, const struct CurveProfile *profile)
bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point, bool handle_1, bool snap, const float delta[2])
struct CurveProfilePoint * BKE_curveprofile_insert(struct CurveProfile *profile, float x, float y)
void BKE_curveprofile_remove_by_flag(struct CurveProfile *profile, short flag)
int BKE_curveprofile_table_size(const struct CurveProfile *profile)
void BKE_curveprofile_free_data(struct CurveProfile *profile)
float BKE_movieclip_remap_scene_to_clip_frame(const struct MovieClip *clip, float framenr)
void BKE_paint_invalidate_cursor_overlay(struct Scene *scene, struct ViewLayer *view_layer, struct CurveMapping *curve)
ePaintMode BKE_paintmode_get_active_from_context(const struct bContext *C)
struct Brush * BKE_paint_brush(struct Paint *paint)
void BKE_palette_color_remove(struct Palette *palette, struct PaletteColor *color)
struct Paint * BKE_paint_get_active_from_context(const struct bContext *C)
void BKE_report(ReportList *reports, eReportType type, const char *message)
struct MovieTrackingMarker * BKE_tracking_marker_ensure(struct MovieTrackingTrack *track, int framenr)
bool BKE_unit_is_valid(int system, int type)
double BKE_unit_base_scalar(int system, int type)
void BLF_boundbox_foreach_glyph(int fontid, const char *str, size_t str_len, BLF_GlyphBoundsFn user_fn, void *user_data) ATTR_NONNULL(2)
float BLF_width(int fontid, const char *str, size_t str_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Generic array manipulation API.
#define BLI_array_deduplicate_ordered(arr, arr_len)
#define BLI_assert_msg(a, msg)
void BLI_linklist_freeN(LinkNode *list)
void void BLI_linklist_prepend(LinkNode **listp, void *ptr) ATTR_NONNULL(1)
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)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(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)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int round_fl_to_int_clamp(float a)
MINLINE float max_fff(float a, float b, float c)
MINLINE int round_fl_to_int(float a)
MINLINE float max_ff(float a, float b)
MINLINE size_t min_zz(size_t a, size_t b)
MINLINE int min_ii(int a, int b)
MINLINE float pow2f(float x)
MINLINE float clamp_f(float value, float min, float max)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE float cube_f(float a)
MINLINE float square_f(float a)
MINLINE float sqrt3f(float f)
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
void rgb_to_hsv_v(const float rgb[3], float r_hsv[3])
MINLINE void srgb_to_linearrgb_v3_v3(float linear[3], const float srgb[3])
void rgb_to_hsv_compat_v(const float rgb[3], float r_hsv[3])
void hsl_to_rgb_v(const float hsl[3], float r_rgb[3])
void hsv_clamp_v(float hsv[3], float v_max)
MINLINE void linearrgb_to_srgb_v3_v3(float srgb[3], const float linear[3])
void rgb_to_hsl_v(const float rgb[3], float r_hsl[3])
void rgb_to_hsl_compat_v(const float rgb[3], float r_hsl[3])
int isect_point_tri_v2(const float pt[2], const float v1[2], const float v2[2], const float v3[2])
float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2])
MINLINE void sub_v2_v2v2_int(int r[2], const int a[2], const int b[2])
MINLINE bool compare_v3v3(const float a[3], const float b[3], float limit) ATTR_WARN_UNUSED_RESULT
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3(float r[3])
MINLINE void add_v2_v2v2_int(int r[2], const int a[2], const int b[2])
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
void dist_ensure_v2_v2fl(float v1[2], const float v2[2], float dist)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE int len_manhattan_v2v2_int(const int a[2], const int b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3_length(float r[3], float unit_scale)
MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v3(float r[3])
MINLINE float normalize_v2_length(float r[2], float unit_scale)
MINLINE float normalize_v2_v2(float r[2], const float a[2])
MINLINE void copy_v2_fl(float r[2], float f)
bool BLI_rctf_clamp_pt_v(const struct rctf *rect, float xy[2])
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
void BLI_rctf_transform_pt_v(const rctf *dst, const rctf *src, float xy_dst[2], const float xy_src[2])
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
bool BLI_rctf_isect_rect_y(const struct rctf *src1, const struct rctf *src2, float range_y[2])
bool BLI_rctf_isect_segment(const struct rctf *rect, const float s1[2], const float s2[2])
bool BLI_rctf_isect_rect_x(const struct rctf *src1, const struct rctf *src2, float range_x[2])
void BLI_rctf_recenter(struct rctf *rect, float x, float y)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
bool BLI_rctf_isect_pt(const struct rctf *rect, float x, float y)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
void BLI_rcti_rctf_copy(struct rcti *dst, const struct rctf *src)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
int BLI_sortutil_cmp_int(const void *a_, const void *b_)
int BLI_str_rstrip_float_zero(char *str, char pad) ATTR_NONNULL()
size_t BLI_snprintf_rlen(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
void BLI_str_cursor_step_utf8(const char *str, size_t maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
bool BLI_str_cursor_step_prev_utf8(const char *str, size_t maxlen, int *pos)
int BLI_str_utf8_size(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
const char const char * BLI_str_find_next_char_utf8(const char *p, const char *str_end) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1
size_t size_t BLI_strnlen_utf8(const char *strc, size_t maxlen) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
size_t BLI_strnlen_utf8_ex(const char *strc, size_t maxlen, size_t *r_len_bytes) ATTR_NONNULL(1
size_t BLI_strlen_utf8(const char *strc) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
int BLI_str_utf8_invalid_strip(char *str, size_t length) ATTR_NONNULL(1)
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL(1
#define UNUSED_VARS_NDEBUG(...)
typedef double(DMatrix)[4][4]
struct Depsgraph Depsgraph
#define USER_UNIT_ROT_RADIANS
#define RGN_ALIGN_ENUM_FROM_MASK(align)
#define UI_LIST_AUTO_SIZE_THRESHOLD
@ UILST_SCROLL_TO_ACTIVE_ITEM
@ UILST_LAYOUT_BIG_PREVIEW_GRID
#define ED_screen_areas_iter(win, screen, area_name)
void ED_region_tag_refresh_ui(struct ARegion *region)
void ED_region_tag_redraw_no_rebuild(struct ARegion *region)
void ED_region_tag_redraw(struct ARegion *region)
bool ED_undo_is_legacy_compatible_for_property(struct bContext *C, struct ID *id)
void ED_undo_push(struct bContext *C, const char *str)
NSNotificationCenter * center
_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 GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_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
BLI_INLINE void IMB_colormanagement_srgb_to_scene_linear_v3(float scene_linear[3], const float srgb[3])
BLI_INLINE void IMB_colormanagement_scene_linear_to_srgb_v3(float srgb[3], const float scene_linear[3])
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
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
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
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 a value between a minimum and a maximum Vector Perform vector math operation Invert a color
Platform independent time functions.
#define RNA_SUBTYPE_UNIT_VALUE(subtype)
bool UI_context_copy_to_selected_check(struct PointerRNA *ptr, struct PointerRNA *ptr_link, struct PropertyRNA *prop, const char *path, bool use_path_from_id, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop)
#define AUTOCOMPLETE_FULL_MATCH
@ UI_EMBOSS_NONE_OR_STATUS
void UI_fontstyle_set(const struct uiFontStyle *fs)
void UI_blocklist_free(const struct bContext *C, struct ARegion *region)
void(* uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2)
void(* uiBlockHandleFunc)(struct bContext *C, void *arg, int event)
struct PointerRNA * UI_but_operator_ptr_get(uiBut *but)
int UI_but_unit_type_get(const uiBut *but)
const struct uiStyle * UI_style_get(void)
struct ARegion * UI_tooltip_create_from_button_or_extra_icon(struct bContext *C, struct ARegion *butregion, uiBut *but, uiButExtraOpIcon *extra_icon, bool is_label)
bool UI_but_is_utf8(const uiBut *but)
#define AUTOCOMPLETE_NO_MATCH
#define UI_TOOLTIP_DELAY_LABEL
void UI_popover_once_clear(uiPopover *pup)
void UI_butstore_free(uiBlock *block, uiButStore *bs)
bool UI_view_item_drag_start(struct bContext *C, const uiViewItemHandle *item_)
#define UI_PRECISION_FLOAT_MAX
#define UI_PRECISION_FLOAT_SCALE
struct PanelType * UI_but_paneltype_get(uiBut *but)
void(* uiFreeArgFunc)(void *arg)
void(* uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr)
bool UI_but_active_only(const struct bContext *C, struct ARegion *region, uiBlock *block, uiBut *but)
void(* uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2)
struct MenuType * UI_but_menutype_get(uiBut *but)
uiButStore * UI_butstore_create(uiBlock *block)
void UI_but_execute(const struct bContext *C, struct ARegion *region, uiBut *but)
void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p)
bool UI_block_layout_needs_resolving(const uiBlock *block)
void(* uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1)
void(* uiMenuHandleFunc)(struct bContext *C, void *arg, int event)
void UI_but_ensure_in_view(const struct bContext *C, struct ARegion *region, const uiBut *but)
bool UI_context_copy_to_selected_list(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, struct ListBase *r_lb, bool *r_use_path_from_id, char **r_path)
void UI_view_item_begin_rename(uiViewItemHandle *item_handle)
uiBlock *(* uiBlockCreateFunc)(struct bContext *C, struct ARegion *region, void *arg1)
bool UI_but_has_tooltip_label(const uiBut *but)
#define UI_but_is_decorator(but)
@ UI_BLOCK_MOVEMOUSE_QUIT
#define WM_UI_HANDLER_CONTINUE
#define ND_SPACE_INFO_REPORT
#define WM_EVENT_CURSOR_MOTION_THRESHOLD
#define WM_UI_HANDLER_BREAK
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert * v
void activate(bool forceActivation=false) const
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void jump(const btVector3 &v=btVector3(0, 0, 0))
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
const Depsgraph * depsgraph
SyclQueue void void size_t num_bytes void
static void copy_array(const Node *node, const SocketType &socket, const Node *other, const SocketType &other_socket)
bool ui_but_is_unit(const uiBut *but)
void ui_but_range_set_hard(uiBut *but)
void ui_but_extra_operator_icons_free(uiBut *but)
bool ui_but_is_compatible(const uiBut *but_a, const uiBut *but_b)
void ui_but_range_set_soft(uiBut *but)
void ui_but_update(uiBut *but)
void ui_block_to_window_rctf(const ARegion *region, uiBlock *block, rctf *rct_dst, const rctf *rct_src)
float ui_block_to_window_scale(const ARegion *region, uiBlock *block)
int ui_but_is_pushed(uiBut *but)
bool ui_but_is_float(const uiBut *but)
PropertyScaleType ui_but_scale_type(const uiBut *but)
void ui_but_override_flag(Main *bmain, uiBut *but)
double ui_but_value_get(uiBut *but)
void ui_region_to_window(const ARegion *region, int *r_x, int *r_y)
void ui_but_string_get(uiBut *but, char *str, const size_t maxlen)
bool ui_but_is_rna_valid(uiBut *but)
void ui_window_to_block_fl(const ARegion *region, uiBlock *block, float *r_x, float *r_y)
bool ui_but_string_set(bContext *C, uiBut *but, const char *str)
bool ui_but_menu_draw_as_popover(const uiBut *but)
void ui_but_value_set(uiBut *but, double value)
void ui_but_convert_to_unit_alt_name(uiBut *but, char *str, size_t maxlen)
void ui_but_string_get_ex(uiBut *but, char *str, const size_t maxlen, const int float_precision, const bool use_exp_float, bool *r_use_exp_float)
void ui_but_update_edited(uiBut *but)
void ui_but_v3_set(uiBut *but, const float vec[3])
void ui_but_v3_get(uiBut *but, float vec[3])
bool ui_but_string_eval_number(bContext *C, const uiBut *but, const char *str, double *r_value)
void ui_fontscale(float *points, float aspect)
void ui_block_to_window_fl(const ARegion *region, uiBlock *block, float *r_x, float *r_y)
int ui_but_string_get_max_length(uiBut *but)
void ui_window_to_block(const ARegion *region, uiBlock *block, int *r_x, int *r_y)
char * ui_but_string_get_dynamic(uiBut *but, int *r_str_size)
bool ui_but_context_poll_operator(bContext *C, wmOperatorType *ot, const uiBut *but)
bool ui_but_supports_cycling(const uiBut *but)
bool ui_but_is_bool(const uiBut *but)
void ui_but_anim_flag(uiBut *but, const AnimationEvalContext *anim_eval_context)
void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra)
bool ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen)
void ui_but_anim_decorate_update_from_flag(uiButDecorator *decorator_but)
bool ui_but_drag_is_draggable(const uiBut *but)
void ui_but_drag_start(bContext *C, uiBut *but)
void UI_context_update_anim_flag(const bContext *C)
static void ui_color_picker_to_rgb_HSVCUBE_v(const uiButHSVCube *hsv_but, const float hsv[3], float rgb[3])
static int ui_handle_view_item_event(bContext *C, const wmEvent *event, ARegion *region, uiBut *view_but)
static void ui_do_but_extra_operator_icons_mousemove(uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_but_paste(bContext *C, uiBut *but, uiHandleButtonData *data, const bool paste_array)
static void ui_multibut_states_apply(bContext *C, uiHandleButtonData *data, uiBlock *block)
static void ui_multibut_free(uiHandleButtonData *data, uiBlock *block)
static void ui_list_activate_row_from_index(bContext *C, ARegion *region, uiBut *listbox, uiList *ui_list, int index)
static CurveProfile but_copypaste_profile
struct uiDragToggleHandle uiDragToggleHandle
static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, float softmax, const enum eSnapType snap)
bool UI_textbutton_activate_rna(const bContext *C, ARegion *region, const void *rna_poin_data, const char *rna_prop_id)
void UI_context_active_but_prop_handle(bContext *C, const bool handle_undo)
#define BUTTON_FLASH_DELAY
static int ui_handle_menu_event(bContext *C, const wmEvent *event, uiPopupBlockHandle *menu, int level, const bool is_parent_inside, const bool is_parent_menu, const bool is_floating)
static bool ui_context_rna_button_active_test(const uiBut *but)
static void button_activate_exit(bContext *C, uiBut *but, uiHandleButtonData *data, const bool mousemove, const bool onfree)
uiBlock * UI_region_block_find_mouse_over(const struct ARegion *region, const int xy[2], bool only_clip)
static bool ui_numedit_but_CURVE(uiBlock *block, uiBut *but, uiHandleButtonData *data, int evtx, int evty, bool snap, const bool shift)
uiBut * UI_context_active_but_get_respect_menu(const bContext *C)
static void ui_afterfunc_update_preferences_dirty(uiAfterFunc *after)
static bool ui_multibut_states_tag(uiBut *but_active, uiHandleButtonData *data, const wmEvent *event)
void ui_but_execute_end(struct bContext *C, struct ARegion *UNUSED(region), uiBut *but, void *active_back)
static bool ui_but_is_drag_toggle(const uiBut *but)
static bool but_copypaste_curve_alive
static void ui_but_paste_numeric_array(bContext *C, uiBut *but, uiHandleButtonData *data, char *buf_paste)
static int ui_do_but_SCROLL(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static char ui_menu_scroll_test(uiBlock *block, int my)
static int ui_do_but_TEX(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
bool ui_but_is_editing(const uiBut *but)
int ui_but_menu_direction(uiBut *but)
bool UI_but_active_drop_name(const bContext *C)
static bool ui_menu_scroll_step(ARegion *region, uiBlock *block, const int scroll_dir)
#define DRAG_MULTINUM_THRESHOLD_DRAG_X
static void ui_numedit_apply(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data)
static bool ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, float mx, float my, const enum eSnapType snap, const bool shift)
void ui_handle_afterfunc_add_operator(wmOperatorType *ot, wmOperatorCallContext opcontext)
static bool ui_textedit_insert_buf(uiBut *but, uiHandleButtonData *data, const char *buf, int buf_len)
static void ui_but_copy_colorband(uiBut *but)
static bool ui_button_value_default(uiBut *but, double *r_value)
static void ui_but_paste_curvemapping(bContext *C, uiBut *but)
static int ui_list_handle_click_drag(bContext *C, const uiList *ui_list, ARegion *region, const wmEvent *event)
static int ui_handle_button_over(bContext *C, const wmEvent *event, ARegion *region)
static void ui_rgb_to_color_picker_HSVCUBE_compat_v(const uiButHSVCube *hsv_but, const float rgb[3], float hsv[3])
#define MENU_TOWARDS_WIGGLE_ROOM
#define BUTTON_MOUSE_TOWARDS_THRESH
void UI_block_interaction_set(uiBlock *block, uiBlockInteraction_CallbackData *callbacks)
#define UI_MAX_PASSWORD_STR
static void ui_apply_but_ROW(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data)
static bool ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx, int my)
static bool ui_list_invoke_item_operator(bContext *C, const uiBut *context_but, wmOperatorType *ot, PointerRNA **properties)
struct uiAfterFunc uiAfterFunc
static int ui_handle_menu_return_submenu(bContext *C, const wmEvent *event, uiPopupBlockHandle *menu)
static int ui_do_but_BUT(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static CurveMapping but_copypaste_curve
static bool ui_mouse_motion_towards_check(uiBlock *block, uiPopupBlockHandle *menu, const int xy[2], const bool use_wiggle_room)
float ui_block_calc_pie_segment(uiBlock *block, const float event_xy[2])
static bool ui_rna_is_userdef(PointerRNA *ptr, PropertyRNA *prop)
static int ui_do_but_CURVEPROFILE(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void float_array_to_string(const float *values, const int values_len, char *output, int output_len_max)
static bool ui_afterfunc_check(const uiBlock *block, const uiBut *but)
static bool but_copypaste_profile_alive
static void button_activate_init(bContext *C, ARegion *region, uiBut *but, uiButtonActivateType type)
static bool ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx, int my, const enum eSnapType snap, const bool shift)
uiBut * UI_context_active_but_get(const bContext *C)
static void ui_handle_button_activate(bContext *C, ARegion *region, uiBut *but, uiButtonActivateType type)
void ui_but_activate_over(bContext *C, ARegion *region, uiBut *but)
static void ui_multibut_states_create(uiBut *but_active, uiHandleButtonData *data)
static bool ui_event_is_snap(const wmEvent *event)
static bool ui_do_but_extra_operator_icon(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_but_copy_numeric_value(uiBut *but, char *output, int output_len_max)
static int ui_do_but_COLOR(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_textedit_string_ensure_max_length(uiBut *but, uiHandleButtonData *data, int maxlen)
static int ui_region_handler(bContext *C, const wmEvent *event, void *UNUSED(userdata))
static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
bool UI_but_is_userdef(const uiBut *but)
static bool ui_mouse_motion_keynav_test(struct uiKeyNavLock *keynav, const wmEvent *event)
static void ui_but_set_float_array(bContext *C, uiBut *but, uiHandleButtonData *data, const float *values, const int values_len)
static int ui_but_pie_menu_apply(bContext *C, uiPopupBlockHandle *menu, uiBut *but, bool force_close)
static void ui_apply_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonData *data)
static int ui_do_but_GRIP(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_apply_but_CURVEPROFILE(bContext *C, uiBut *but, uiHandleButtonData *data)
#define DRAG_MULTINUM_THRESHOLD_DRAG_Y
static bool ui_do_but_ANY_drag_toggle(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event, int *r_retval)
#define UI_PROP_SCALE_LOG_SNAP_OFFSET
static void ui_do_but_textedit_select(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static bool ui_but_dragedit_update_mval(uiHandleButtonData *data, int mx)
static void popup_check(bContext *C, wmOperator *op)
uiBut * UI_region_active_but_get(const ARegion *region)
static void ui_apply_but_WAVEFORM(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_but_paste_color(bContext *C, uiBut *but, char *buf_paste)
static uiBut * ui_block_pie_dir_activate(uiBlock *block, const wmEvent *event, RadialDirection dir)
static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static bool ui_menu_scroll_to_y(ARegion *region, uiBlock *block, int y)
ARegion * UI_region_searchbox_region_get(const ARegion *button_region)
static void ui_numedit_begin_set_values(uiBut *but, uiHandleButtonData *data)
static bool ui_but_copy_menu(uiBut *but, char *output, int output_len_max)
static bool ui_textedit_insert_ascii(uiBut *but, uiHandleButtonData *data, const char ascii)
static bool ui_drag_toggle_but_is_supported(const uiBut *but)
static bool ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data, int mx, const bool is_horizontal, const bool is_motion, const bool snap, const bool shift)
static void ui_palette_set_active(uiButColor *color_but)
static bool ui_but_pie_menu_supported_apply(uiBut *but)
static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *event)
static void ui_region_auto_open_clear(ARegion *region)
static void ui_rna_update_preferences_dirty(PointerRNA *ptr, PropertyRNA *prop)
void ui_but_clipboard_free(void)
void UI_but_tooltip_timer_remove(bContext *C, uiBut *but)
void UI_popup_menu_retval_set(const uiBlock *block, const int retval, const bool enable)
static int ui_drag_toggle_but_pushed_state(uiBut *but)
static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static int ui_do_but_LISTROW(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_selectcontext_apply(bContext *C, uiBut *but, struct uiSelectContextStore *selctx_data, const double value, const double value_orig)
static void ui_apply_but_CURVE(bContext *C, uiBut *but, uiHandleButtonData *data)
static bool button_modal_state(uiHandleButtonState state)
static float ui_mouse_scale_warp_factor(const bool shift)
static void ui_apply_but_IMAGE(bContext *C, uiBut *but, uiHandleButtonData *data)
static ListBase UIAfterFuncs
static void ui_block_open_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
uiBut * UI_context_active_but_prop_get(const bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index)
void ui_but_active_free(const bContext *C, uiBut *but)
static void ui_color_snap_hue(const enum eSnapType snap, float *r_hue)
static void ui_menu_scroll_apply_offset_y(ARegion *region, uiBlock *block, float dy)
static int ui_list_activate_hovered_row(bContext *C, ARegion *region, const uiList *ui_list, const wmEvent *event, bool activate_dragging)
void ui_but_active_string_clear_and_exit(bContext *C, uiBut *but)
static void ui_apply_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_textedit_prev_but(uiBlock *block, uiBut *actbut, uiHandleButtonData *data)
static bool ui_textedit_set_cursor_pos_foreach_glyph(const char *UNUSED(str), const size_t str_step_ofs, const rcti *glyph_step_bounds, const int UNUSED(glyph_advance_x), const rcti *glyph_bounds, const int UNUSED(glyph_bearing[2]), void *user_data)
@ BUTTON_STATE_WAIT_FLASH
@ BUTTON_STATE_NUM_EDITING
@ BUTTON_STATE_TEXT_EDITING
@ BUTTON_STATE_TEXT_SELECTING
@ BUTTON_STATE_WAIT_KEY_EVENT
@ BUTTON_STATE_WAIT_RELEASE
static int ui_do_but_SEARCH_UNLINK(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_apply_but_NUM(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_but_paste_numeric_value(bContext *C, uiBut *but, uiHandleButtonData *data, char *buf_paste)
static void ui_numedit_end(uiBut *but, uiHandleButtonData *data)
static void ui_apply_but_VIEW_ITEM(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data)
static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_but_extra_operator_icon_apply(bContext *C, uiBut *but, uiButExtraOpIcon *op_icon)
static void ui_but_paste_normalized_vector(bContext *C, uiBut *but, uiHandleButtonData *data, char *buf_paste)
#define UI_PROP_SCALE_LOG_MIN
static void ui_but_update_preferences_dirty(uiBut *but)
void ui_pan_to_scroll(const wmEvent *event, int *type, int *val)
static int ui_do_but_HISTOGRAM(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static struct uiBlockInteraction_Handle * ui_block_interaction_begin(struct bContext *C, uiBlock *block, const bool is_click)
static int ui_list_get_increment(const uiList *ui_list, const int type, const int columns)
static uiBut * ui_context_rna_button_active(const bContext *C)
static int ui_do_but_WAVEFORM(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_apply_but_func(bContext *C, uiBut *but)
static void ui_mouse_scale_warp(uiHandleButtonData *data, const float mx, const float my, float *r_mx, float *r_my, const bool shift)
struct uiSelectContextStore uiSelectContextStore
static bool ui_list_is_hovering_draggable_but(bContext *C, const uiList *list, const ARegion *region, const wmEvent *event)
static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, const float x)
static void ui_apply_but_COLORBAND(bContext *C, uiBut *but, uiHandleButtonData *data)
static bool ui_numedit_but_CURVEPROFILE(uiBlock *block, uiBut *but, uiHandleButtonData *data, int evtx, int evty, bool snap, const bool shift)
static bool ui_drag_toggle_set_xy_xy(bContext *C, ARegion *region, const int pushed_state, const int xy_src[2], const int xy_dst[2])
static void ui_apply_but_VEC(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, eStrCursorJumpDirection direction, const bool select, eStrCursorJumpType jump)
static bool ui_numedit_but_UNITVEC(uiBut *but, uiHandleButtonData *data, int mx, int my, const enum eSnapType snap)
static void ui_apply_but_BUTM(bContext *C, uiBut *but, uiHandleButtonData *data)
static enum eSnapType ui_event_to_snap(const wmEvent *event)
struct uiHandleButtonMulti uiHandleButtonMulti
static void ui_but_copy_operator(bContext *C, uiBut *but, char *output, int output_len_max)
#define MENU_SCROLL_INTERVAL
static void ui_apply_but_BUT(bContext *C, uiBut *but, uiHandleButtonData *data)
#define MENU_TOWARDS_MARGIN
static void ui_selectcontext_end(uiBut *but, uiSelectContextStore *selctx_data)
static int ui_do_but_TRACKPREVIEW(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
bool UI_textbutton_activate_but(const bContext *C, uiBut *actbut)
void UI_context_active_but_clear(bContext *C, wmWindow *win, ARegion *region)
static int ui_handle_menu_button(bContext *C, const wmEvent *event, uiPopupBlockHandle *menu)
static void ui_block_interaction_end(struct bContext *C, uiBlockInteraction_CallbackData *callbacks, struct uiBlockInteraction_Handle *interaction)
static bool ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, const int mode)
static void ui_numedit_set_active(uiBut *but)
struct uiSelectContextElem uiSelectContextElem
static ColorBand but_copypaste_coba
static void ui_block_interaction_update(struct bContext *C, uiBlockInteraction_CallbackData *callbacks, struct uiBlockInteraction_Handle *interaction)
static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static int ui_do_but_EXIT(bContext *C, uiBut *but, struct uiHandleButtonData *data, const wmEvent *event)
static bool point_draw_handles(CurveProfilePoint *point)
static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState state)
static void ui_mouse_motion_keynav_init(struct uiKeyNavLock *keynav, const wmEvent *event)
static void ui_apply_but_autokey(bContext *C, uiBut *but)
static uiBut * ui_context_button_active(const ARegion *region, bool(*but_check_cb)(const uiBut *))
static bool ui_but_drag_init(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
@ BUTTON_ACTIVATE_TEXT_EDITING
static bool ui_numedit_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonData *data, int mx, int my, const bool shift)
static void ui_apply_but_undo(uiBut *but)
static float ui_numedit_apply_snap(int temp, float softmin, float softmax, const enum eSnapType snap)
#define DRAG_MULTINUM_THRESHOLD_VERTICAL
static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_handler_region_drag_toggle_remove(bContext *UNUSED(C), void *userdata)
static void ui_numedit_begin(uiBut *but, uiHandleButtonData *data)
static uiBut * ui_but_find_open_event(ARegion *region, const wmEvent *event)
#define UI_DRAG_MAP_SOFT_RANGE_PIXEL_MAX
static int ui_do_but_VIEW_ITEM(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
#define BUTTON_DRAGLOCK_THRESH
static void ui_handle_afterfunc_add_operator_ex(wmOperatorType *ot, PointerRNA **properties, wmOperatorCallContext opcontext, const uiBut *context_but)
static void ui_textedit_set_cursor_select(uiBut *but, uiHandleButtonData *data, const float x)
void ui_but_activate_event(bContext *C, ARegion *region, uiBut *but)
uiBut * ui_but_find_select_in_enum(uiBut *but, int direction)
static int ui_handler_region_drag_toggle(bContext *C, const wmEvent *event, void *userdata)
static bool ui_numedit_but_NUM(uiButNumber *number_but, uiHandleButtonData *data, int mx, const bool is_motion, const enum eSnapType snap, float fac)
static int ui_handle_list_event(bContext *C, const wmEvent *event, ARegion *region, uiBut *listbox)
static int ui_do_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_handle_button_return_submenu(bContext *C, const wmEvent *event, uiBut *but)
static void ui_textedit_string_set(uiBut *but, struct uiHandleButtonData *data, const char *str)
static void ui_but_copy(bContext *C, uiBut *but, const bool copy_array)
static void ui_textedit_next_but(uiBlock *block, uiBut *actbut, uiHandleButtonData *data)
static void ui_multibut_add(uiHandleButtonData *data, uiBut *but)
static void ui_but_copy_numeric_array(uiBut *but, char *output, int output_len_max)
void UI_but_tooltip_refresh(bContext *C, uiBut *but)
#define IS_ALLSELECT_EVENT(event)
static void ui_but_copy_text(uiBut *but, char *output, int output_len_max)
static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static bool ui_handle_button_activate_by_type(bContext *C, ARegion *region, uiBut *but)
static bool parse_float_array(char *text, float *values, int values_len_expected)
bool UI_but_active_drop_color(bContext *C)
static int ui_do_but_TAB(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_block_open_end(bContext *C, uiBut *but, uiHandleButtonData *data)
#define UI_BUT_IS_SELECT_CONTEXT
static void ui_mouse_motion_towards_init(uiPopupBlockHandle *menu, const int xy[2])
static void ui_region_handler_remove(bContext *C, void *UNUSED(userdata))
static uiButExtraOpIcon * ui_but_extra_operator_icon_mouse_over_get(uiBut *but, ARegion *region, const wmEvent *event)
static void ui_mouse_motion_towards_init_ex(uiPopupBlockHandle *menu, const int xy[2], const bool force)
struct uiHandleButtonData uiHandleButtonData
static void ui_apply_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_but_copy_CurveProfile(uiBut *but)
static void ui_drag_toggle_set(bContext *C, uiDragToggleHandle *drag_info, const int xy_input[2])
static void ui_apply_but(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const bool interactive)
static void ui_apply_but_HISTOGRAM(bContext *C, uiBut *but, uiHandleButtonData *data)
static bool ui_textedit_delete_selection(uiBut *but, uiHandleButtonData *data)
static int ui_handle_view_items_hover(const wmEvent *event, const ARegion *region)
void UI_screen_free_active_but_highlight(const bContext *C, bScreen *screen)
static void ui_but_paste_CurveProfile(bContext *C, uiBut *but)
static void clamp_axis_max_v3(float v[3], const float max)
static uiAfterFunc * ui_afterfunc_new(void)
#define CASE_NUM_TO_DIR(n, d)
static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static uiButMultiState * ui_multibut_lookup(uiHandleButtonData *data, const uiBut *but)
static void ui_rgb_to_color_picker_HSVCUBE_v(const uiButHSVCube *hsv_but, const float rgb[3], float hsv[3])
static void ui_apply_but_TEX(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_but_get_pasted_text_from_clipboard(char **buf_paste, int *buf_len)
void ui_but_update_view_for_active(const bContext *C, const uiBlock *block)
static int ui_text_position_to_hidden(uiBut *but, int pos)
static void ui_apply_but_funcs_after(bContext *C)
void ui_but_set_string_interactive(bContext *C, uiBut *but, const char *value)
#define BUTTON_KEYNAV_PX_LIMIT
static int ui_popup_handler(bContext *C, const wmEvent *event, void *userdata)
static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static int ui_do_but_COLORBAND(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static int get_but_property_array_length(uiBut *but)
#define PIE_MENU_INTERVAL
wmOperator * UI_context_active_operator_get(const struct bContext *C)
static int ui_text_position_from_hidden(uiBut *but, int pos)
static void ui_multibut_restore(bContext *C, uiHandleButtonData *data, uiBlock *block)
static ARegion * ui_but_tooltip_init(bContext *C, ARegion *region, int *pass, double *r_pass_delay, bool *r_exit_on_event)
static void ui_but_paste_colorband(bContext *C, uiBut *but, uiHandleButtonData *data)
static bool ui_textedit_delete(uiBut *but, uiHandleButtonData *data, int direction, eStrCursorJumpType jump)
static void ui_but_copy_curvemapping(uiBut *but)
static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static int ui_but_pie_button_activate(bContext *C, uiBut *but, uiPopupBlockHandle *menu)
void UI_popup_handlers_remove(ListBase *handlers, uiPopupBlockHandle *popup)
static bool ui_but_copy_popover(uiBut *but, char *output, int output_len_max)
static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
static void ui_block_interaction_begin_ensure(bContext *C, uiBlock *block, struct uiHandleButtonData *data, const bool is_click)
static void ui_blocks_set_tooltips(ARegion *region, const bool enable)
static void ui_popup_handler_remove(bContext *C, void *userdata)
static void ui_mouse_motion_towards_reinit(uiPopupBlockHandle *menu, const int xy[2])
static int ui_do_but_UNITVEC(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
void UI_region_handlers_add(ListBase *handlers)
static bool ui_selectcontext_begin(bContext *C, uiBut *but, struct uiSelectContextStore *selctx_data)
static int ui_textedit_autocomplete(bContext *C, uiBut *but, uiHandleButtonData *data)
uiBut * UI_but_active_drop_name_button(const bContext *C)
void ui_but_text_password_hide(char password_str[UI_MAX_PASSWORD_STR], uiBut *but, const bool restore)
static bool ui_but_find_select_in_enum__cmp(const uiBut *but_a, const uiBut *but_b)
static int ui_handle_menus_recursive(bContext *C, const wmEvent *event, uiPopupBlockHandle *menu, int level, const bool is_parent_inside, const bool is_parent_menu, const bool is_floating)
static bool ui_numedit_but_COLORBAND(uiBut *but, uiHandleButtonData *data, int mx)
static int ui_do_but_KEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
static void ui_but_copy_color(uiBut *but, char *output, int output_len_max)
struct uiButMultiState uiButMultiState
static void button_tooltip_timer_reset(bContext *C, uiBut *but)
void UI_popup_handlers_add(bContext *C, ListBase *handlers, uiPopupBlockHandle *popup, const char flag)
struct uiBlockInteraction_Handle uiBlockInteraction_Handle
static bool ui_menu_scroll_to_but(ARegion *region, uiBlock *block, uiBut *but_target)
void UI_region_free_active_but_all(bContext *C, ARegion *region)
static bool ui_numedit_but_WAVEFORM(uiBut *but, uiHandleButtonData *data, int mx, int my)
#define BUTTON_AUTO_OPEN_THRESH
static int ui_handler_region_menu(bContext *C, const wmEvent *event, void *userdata)
static int ui_pie_handler(bContext *C, const wmEvent *event, uiPopupBlockHandle *menu)
static void ui_but_paste_text(bContext *C, uiBut *but, uiHandleButtonData *data, char *buf_paste)
void ui_but_execute_begin(struct bContext *UNUSED(C), struct ARegion *region, uiBut *but, void **active_back)
static uiBut * ui_but_list_row_text_activate(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event, uiButtonActivateType activate_type)
uiBut * UI_region_but_find_rect_over(const ARegion *region, const rcti *rect_px)
static bool ui_menu_pass_event_to_parent_if_nonactive(uiPopupBlockHandle *menu, const uiBut *but, const int level, const int retval)
static void ui_apply_but_LISTROW(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data)
void UI_popup_handlers_remove_all(bContext *C, ListBase *handlers)
static void ui_apply_but_TAB(bContext *C, uiBut *but, uiHandleButtonData *data)
struct uiUndoStack_Text * ui_textedit_undo_stack_create(void)
uiBlock * ui_block_find_mouse_over_ex(const struct ARegion *region, const int xy[2], bool only_clip) ATTR_NONNULL(1
void ui_hsvcircle_vals_from_pos(const rcti *rect, float mx, float my, float *r_val_rad, float *r_val_dist)
bool ui_but_is_cursor_warp(const uiBut *but) ATTR_WARN_UNUSED_RESULT
bool ui_searchbox_apply(uiBut *but, struct ARegion *region)
uiPopupBlockHandle * ui_popup_block_create(struct bContext *C, struct ARegion *butregion, uiBut *but, uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg, uiFreeArgFunc arg_free)
uiBut * ui_region_find_active_but(struct ARegion *region) ATTR_WARN_UNUSED_RESULT
uiBut * ui_but_find_mouse_over_ex(const struct ARegion *region, const int xy[2], bool labeledit, bool for_tooltip, const uiButFindPollFn find_poll, const void *find_custom_data) ATTR_NONNULL(1
void ui_perceptual_to_scene_linear_space(uiBut *but, float rgb[3])
size_t size_t ui_but_drawstr_len_without_sep_char(const uiBut *but)
uiBut * ui_list_row_find_mouse_over(const struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
void ui_popup_menu_memory_set(uiBlock *block, struct uiBut *but)
void ui_color_picker_hsv_to_rgb(const float r_cp[3], float rgb[3])
bool ui_block_is_pie_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
uiBlock *(* uiBlockHandleCreateFunc)(struct bContext *C, struct uiPopupBlockHandle *handle, void *arg1)
int ui_handler_panel_region(struct bContext *C, const struct wmEvent *event, struct ARegion *region, const uiBut *active_but)
bool ui_searchbox_event(struct bContext *C, struct ARegion *region, uiBut *but, struct ARegion *butregion, const struct wmEvent *event)
bool ui_but_has_array_value(const uiBut *but) ATTR_WARN_UNUSED_RESULT
uiBut * ui_view_item_find_mouse_over(const struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
#define UI_BITBUT_VALUE_TOGGLED(a, b)
uiBut * ui_but_next(uiBut *but) ATTR_WARN_UNUSED_RESULT
size_t ui_but_tip_len_only_first_line(const uiBut *but)
bool ui_region_contains_point_px(const struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
bool ui_block_is_popup_any(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
uiBut * ui_but_find_rect_over(const struct ARegion *region, const rcti *rect_px) ATTR_WARN_UNUSED_RESULT
const char * ui_textedit_undo(struct uiUndoStack_Text *undo_stack, int direction, int *r_cursor_index)
void ui_scene_linear_to_perceptual_space(uiBut *but, float rgb[3])
#define PIE_CLICK_THRESHOLD_SQ
int ui_but_menu_step(uiBut *but, int direction)
void ui_hsvcube_pos_from_vals(const struct uiButHSVCube *hsv_but, const rcti *rect, const float *hsv, float *xp, float *yp)
void ui_popup_block_free(struct bContext *C, uiPopupBlockHandle *handle)
uiBut * ui_list_row_find_from_index(const struct ARegion *region, int index, uiBut *listbox) ATTR_WARN_UNUSED_RESULT
bool ui_block_is_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
bool ui_searchbox_inside(struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
#define UI_MENU_SCROLL_PAD
bool ui_but_contains_point_px_icon(const uiBut *but, struct ARegion *region, const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ARegion struct ARegion * ui_screen_region_find_mouse_over(struct bScreen *screen, const struct wmEvent *event)
void ui_but_hsv_set(uiBut *but)
uiBut * ui_but_find_mouse_over(const struct ARegion *region, const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT
@ UI_PIE_ANIMATION_FINISHED
@ UI_PIE_INITIAL_DIRECTION
@ UI_PIE_GESTURE_END_WAIT
void ui_hsvcircle_pos_from_vals(const ColorPicker *cpicker, const rcti *rect, const float *hsv, float *xpos, float *ypos)
void ui_textedit_undo_stack_destroy(struct uiUndoStack_Text *undo_stack)
void ui_searchbox_update(struct bContext *C, struct ARegion *region, uiBut *but, bool reset)
#define UI_MENU_SCROLL_ARROW
bool ui_but_contains_pt(const uiBut *but, float mx, float my) ATTR_WARN_UNUSED_RESULT
size_t ui_but_drawstr_without_sep_char(const uiBut *but, char *str, size_t str_maxlen) ATTR_NONNULL(1
uiBut * ui_block_active_but_get(const uiBlock *block)
bool ui_but_contains_password(const uiBut *but) ATTR_WARN_UNUSED_RESULT
bool ui_but_is_editable(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void ui_textedit_undo_push(struct uiUndoStack_Text *undo_stack, const char *text, int cursor_index)
bool ui_but_is_interactive(const uiBut *but, bool labeledit) ATTR_WARN_UNUSED_RESULT
uiBut * ui_but_last(uiBlock *block) ATTR_WARN_UNUSED_RESULT
void ui_color_picker_rgb_to_hsv_compat(const float rgb[3], float r_cp[3])
uiBut * ui_list_find_from_row(const struct ARegion *region, const uiBut *row_but) ATTR_WARN_UNUSED_RESULT
uiPopupBlockHandle * ui_popup_menu_create(struct bContext *C, struct ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
uiBut * ui_region_find_first_but_test_flag(struct ARegion *region, int flag_include, int flag_exclude)
uiBut * ui_but_prev(uiBut *but) ATTR_WARN_UNUSED_RESULT
void ui_but_pie_dir(RadialDirection dir, float vec[2])
bool ui_but_contains_point_px(const uiBut *but, const struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
void ui_popup_translate(struct ARegion *region, const int mdiff[2])
bool ui_but_is_popover_once_compat(const uiBut *but) ATTR_WARN_UNUSED_RESULT
bool ui_but_is_editable_as_text(const uiBut *but) ATTR_WARN_UNUSED_RESULT
bool int ui_searchbox_find_index(struct ARegion *region, const char *name)
int ui_searchbox_autocomplete(struct bContext *C, struct ARegion *region, uiBut *but, char *str)
uiBlock * ui_block_func_COLOR(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but)
uiBut * ui_but_first(uiBlock *block) ATTR_WARN_UNUSED_RESULT
void ui_popup_block_scrolltest(struct uiBlock *block)
void ui_searchbox_free(struct bContext *C, struct ARegion *region)
uiBut * ui_list_find_mouse_over(const struct ARegion *region, const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT
uiPopupBlockHandle * ui_popover_panel_create(struct bContext *C, struct ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
#define UI_MENU_SCROLL_MOUSE
ccl_global KernelShaderEvalInput ccl_global float * output
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
T length(const vec_base< T, Size > &a)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken rgba("rgba", pxr::TfToken::Immortal)
static const pxr::TfToken rgb("rgb", pxr::TfToken::Immortal)
static void update(bNodeTree *ntree)
vector snap(vector a, vector b)
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_float_get_default_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, bool value)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
bool RNA_property_array_check(PropertyRNA *prop)
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
const char * RNA_property_identifier(const PropertyRNA *prop)
void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, float value)
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
float RNA_property_float_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin, float *hardmax)
PropertyType RNA_property_type(PropertyRNA *prop)
const PointerRNA PointerRNA_NULL
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_int_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_flag(PropertyRNA *prop)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
int RNA_property_int_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, int *hardmax)
bool RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
float RNA_property_float_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const bool *values)
StructRNA * RNA_struct_base(StructRNA *type)
struct ColorBand * gradient
float luminosity_lock_value
CurveProfilePoint * table
struct MovieTrackingMarker * marker
struct MovieTrackingTrack * track
char idname[BKE_ST_MAXNAME]
struct wmTooltipState * tool_tip
char undostr[BKE_UNDO_STR_MAX]
uiBlockInteraction_Handle * custom_interaction_handle
wmOperatorCallContext opcontext
struct uiAfterFunc * next
uiBlockInteraction_CallbackData custom_interaction_callbacks
char drawstr[UI_MAX_DRAW_STR]
uiBlockHandleFunc handle_func
uiMenuHandleFunc butm_func
struct uiAfterFunc * prev
uiButHandleRenameFunc rename_func
uiFreeArgFunc search_arg_free_fn
uiBlockInteractionBeginFn begin_fn
uiBlockInteractionEndFn end_fn
uiBlockInteractionUpdateFn update_fn
struct uiBlockInteraction_Params params
uint unique_retval_ids_len
struct UnitSettings * unit
uiPopupBlockHandle * handle
struct PieMenuData pie_data
uiBlockHandleFunc handle_func
uiBlockInteraction_CallbackData custom_interaction_callbacks
uiMenuHandleFunc butm_func
int(* block_event_func)(const struct bContext *C, struct uiBlock *, const struct wmEvent *)
struct ColorBand * edit_coba
struct CurveMapping * edit_cumap
struct CurveProfile * edit_profile
eButGradientType gradient_type
uiSelectContextStore select_others
bool results_are_suggestions
uiButSearchCreateFn popup_create_fn
uiFreeArgFunc arg_free_fn
uiViewItemHandle * view_item
wmOperatorCallContext opcontext
uiButCompleteFunc autocomplete_func
struct bContextStore * context
struct uiHandleButtonData * active
uiMenuCreateFunc menu_create_func
uiButHandleHoldFunc hold_func
struct PointerRNA * opptr
struct wmOperatorType * optype
uiButHandleRenameFunc rename_func
uiBlockCreateFunc block_create_func
char drawstr[UI_MAX_DRAW_STR]
struct PropertyRNA * rnaprop
struct PointerRNA rnapoin
struct wmOperatorType * custom_activate_optype
struct PointerRNA * custom_drag_opptr
int * items_filter_neworder
struct wmOperatorType * custom_drag_optype
struct PointerRNA * custom_activate_opptr
struct wmTimer * scrolltimer
struct ARegion * ctx_region
struct wmOperator * popup_op
struct uiKeyNavLock keynav_state
struct ScrArea * ctx_area
struct uiPopupBlockCreate popup_create_vars
void(* cancel_func)(struct bContext *C, void *arg)
void(* popup_func)(struct bContext *C, void *arg, int event)
struct uiSafetyRct * next
uiSelectContextElem * elems
wmUIHandlerRemoveFunc remove_fn
wmUIHandlerFunc handle_fn
struct wmEventHandler * next
enum eWM_EventHandlerType type
struct wmOperatorType * optype
struct PointerRNA * opptr
wmOperatorCallContext opcontext
bool(* check)(struct bContext *, struct wmOperator *)
struct wmOperatorType * type
struct wmEvent * eventstate
short pie_event_type_last
struct wmIMEData * ime_data
double PIL_check_seconds_timer(void)
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_grab_enable(wmWindow *win, int wrap, bool hide, int bounds[4])
void WM_cursor_modal_restore(wmWindow *win)
void WM_cursor_grab_disable(wmWindow *win, const int mouse_ungrab_xy[2])
void WM_event_start_drag(bContext *C, int icon, int type, void *poin, double value, unsigned int flags)
int WM_event_drag_threshold(const struct wmEvent *event)
int WM_event_absolute_delta_y(const struct wmEvent *event)
void WM_event_drag_start_xy(const wmEvent *event, int r_xy[2])
wmEventHandler_UI * WM_event_add_ui_handler(const bContext *C, ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const char flag)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_report(eReportType type, const char *message)
void WM_report_banner_show(void)
void WM_event_free_ui_handler_all(bContext *C, ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn)
void WM_reportf(eReportType type, const char *format,...)
void WM_operator_name_call_ptr_with_depends_on_cursor(bContext *C, wmOperatorType *ot, wmOperatorCallContext opcontext, PointerRNA *properties, const wmEvent *event, const char *drawstr)
void WM_event_remove_ui_handler(ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const bool postpone)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void wm_event_handler_ui_cancel_ex(bContext *C, wmWindow *win, ARegion *region, bool reactivate_button)
void wm_event_init_from_window(wmWindow *win, wmEvent *event)
void WM_event_add_mousemove(wmWindow *win)
#define WM_HANDLER_CONTINUE
#define ISMOUSE_BUTTON(event_type)
#define ISMOUSE_MOTION(event_type)
#define ISKEYBOARD(event_type)
#define ISHOTKEY(event_type)
void WM_gestures_remove(wmWindow *win)
const char * WM_key_event_string(const short type, const bool compact)
char * WM_prop_pystring_assign(bContext *C, PointerRNA *ptr, PropertyRNA *prop, int index)
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_free(PointerRNA *ptr)
bool WM_stereo3d_enabled(wmWindow *win, bool skip_stereo3d_check)
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
void WM_clipboard_text_set(const char *buf, bool selection)
char * WM_clipboard_text_get_firstline(bool selection, int *r_len)
bScreen * WM_window_get_active_screen(const wmWindow *win)
wmTimer * WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type, double timestep)