Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_markers.c
| Show First 20 Lines • Show All 995 Lines • ▼ Show 20 Lines | switch (event->type) { | ||||
| dx = BLI_rctf_size_x(&v2d->cur) / BLI_rcti_size_x(&v2d->mask); | dx = BLI_rctf_size_x(&v2d->cur) / BLI_rcti_size_x(&v2d->mask); | ||||
| if (event->x != mm->evtx) { /* XXX maybe init for first time */ | if (event->x != mm->evtx) { /* XXX maybe init for first time */ | ||||
| float fac; | float fac; | ||||
| mm->evtx = event->x; | mm->evtx = event->x; | ||||
| fac = ((float)(event->x - mm->firstx) * dx); | fac = ((float)(event->x - mm->firstx) * dx); | ||||
| apply_keyb_grid(event->shift, | apply_keyb_grid(event->shift, event->ctrl, &fac, 0.0, FPS, 0.1 * FPS, 0); | ||||
| event->ctrl, | |||||
| &fac, | |||||
| 0.0, | |||||
| 1.0, | |||||
| 0.1, | |||||
| 0 /*was: U.flag & USER_AUTOGRABGRID*/); | |||||
| RNA_int_set(op->ptr, "frames", (int)fac); | RNA_int_set(op->ptr, "frames", (int)fac); | ||||
| ed_marker_move_apply(C, op); | ed_marker_move_apply(C, op); | ||||
| ed_marker_move_update_header(C, op); | ed_marker_move_update_header(C, op); | ||||
| } | } | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 694 Lines • Show Last 20 Lines | |||||