´´´
error C4133: 'function': incompatible types - from 'float [2]' to 'int *'
error C4133: 'function': incompatible types - from 'const int [2]' to 'const float *'
´´´
This commit is contained in:
Germano Cavalcante 2021-10-21 18:11:16 -03:00
parent f45470472f
commit d9ebe25a0c
2 changed files with 5 additions and 4 deletions

View File

@ -360,7 +360,7 @@ static void slider_update_factor(tSlider *slider, const wmEvent *event)
/* Reduced factor delta in precision mode (shift held). */
slider->raw_factor += slider->precision ? (factor_delta / 8) : factor_delta;
slider->factor = slider->raw_factor;
copy_v2_v2_int(slider->last_cursor, event->xy);
copy_v2fl_v2i(slider->last_cursor, event->xy);
if (!slider->overshoot) {
slider->factor = clamp_f(slider->factor, 0, 1);
@ -402,7 +402,7 @@ tSlider *ED_slider_create(struct bContext *C)
*/
void ED_slider_init(struct tSlider *slider, const wmEvent *event)
{
copy_v2_v2_int(slider->last_cursor, event->xy);
copy_v2fl_v2i(slider->last_cursor, event->xy);
}
/**

View File

@ -2956,7 +2956,7 @@ static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *even
delta[1] = rc->initial_mouse[1] - rc->slow_mouse[1];
/* precision angle gets calculated from dial and gets added later */
angle_precision = -0.1f * BLI_dial_angle(rc->dial, event->xy);
angle_precision = -0.1f * BLI_dial_angle(rc->dial, (float[2]){UNPACK2(event->xy)});
}
else {
delta[0] = rc->initial_mouse[0] - rc->slow_mouse[0];
@ -2979,7 +2979,8 @@ static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *even
}
}
else {
sub_v2_v2v2_int(delta, rc->initial_mouse, event->xy);
delta[0] = (float)(rc->initial_mouse[0] - event->xy[0]);
delta[1] = (float)(rc->initial_mouse[1] - event->xy[1]);
if (rc->zoom_prop) {
RNA_property_float_get_array(&rc->zoom_ptr, rc->zoom_prop, zoom);
delta[0] /= zoom[0];