Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_operators.c
| Show First 20 Lines • Show All 2,635 Lines • ▼ Show 20 Lines | switch (event->type) { | ||||
| delta[0] /= zoom[0]; | delta[0] /= zoom[0]; | ||||
| } | } | ||||
| dist = dist + 0.1f * (delta[0]); | dist = dist + 0.1f * (delta[0]); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| delta[0] = rc->initial_mouse[0] - event->x; | delta[0] = rc->initial_mouse[0] - event->x; | ||||
| delta[1] = 0.0f; | delta[1] = rc->initial_mouse[1] - event->y; | ||||
| if (rc->zoom_prop) { | if (rc->zoom_prop) { | ||||
| RNA_property_float_get_array(&rc->zoom_ptr, rc->zoom_prop, zoom); | RNA_property_float_get_array(&rc->zoom_ptr, rc->zoom_prop, zoom); | ||||
| delta[0] /= zoom[0]; | delta[0] /= zoom[0]; | ||||
| delta[1] /= zoom[1]; | |||||
| } | } | ||||
| if (rc->subtype == PROP_ANGLE) { | |||||
| dist = len_v2(delta); | |||||
| } | |||||
| else { | |||||
| dist = clamp_f(-delta[0], 0.0f, FLT_MAX); | dist = clamp_f(-delta[0], 0.0f, FLT_MAX); | ||||
| } | } | ||||
| } | |||||
| /* calculate new value and apply snapping */ | /* calculate new value and apply snapping */ | ||||
| switch (rc->subtype) { | switch (rc->subtype) { | ||||
| case PROP_NONE: | case PROP_NONE: | ||||
| case PROP_DISTANCE: | case PROP_DISTANCE: | ||||
| case PROP_PIXEL: | case PROP_PIXEL: | ||||
| new_value = dist; | new_value = dist; | ||||
| if (snap) { | if (snap) { | ||||
| ▲ Show 20 Lines • Show All 1,082 Lines • Show Last 20 Lines | |||||