diff options
Diffstat (limited to 'source/blender/editors/animation/anim_markers.c')
-rw-r--r-- | source/blender/editors/animation/anim_markers.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 4af3c051c6d..e65ca3d20be 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -45,6 +45,7 @@ #include "BKE_report.h" #include "BKE_scene.h" #include "BKE_screen.h" +#include "BKE_unit.h" #include "RNA_access.h" #include "RNA_define.h" @@ -603,6 +604,7 @@ typedef struct MarkerMove { /* return 0 if not OK */ static int ed_marker_move_init(bContext *C, wmOperator *op) { + Scene *scene = CTX_data_scene(C); ListBase *markers = ED_context_get_markers(C); MarkerMove *mm; TimeMarker *marker; @@ -623,8 +625,10 @@ static int ed_marker_move_init(bContext *C, wmOperator *op) initNumInput(&mm->num); mm->num.idx_max = 0; /* one axis */ - mm->num.flag |= NUM_NO_FRACTION; - mm->num.increment = 1.0f; + mm->num.val_flag[0] |= NUM_NO_FRACTION; + mm->num.unit_sys = scene->unit.system; + /* No time unit supporting frames currently... */ + mm->num.unit_type[0] = B_UNIT_NONE; for (a = 0, marker = markers->first; marker; marker = marker->next) { if (marker->flag & SELECT) { @@ -832,7 +836,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, const wmEvent *even } if (event->val == KM_PRESS) { - if (handleNumInput(&mm->num, event)) { + if (handleNumInput(C, &mm->num, event)) { char str_tx[NUM_STR_REP_LEN]; float value = RNA_int_get(op->ptr, "frames"); applyNumInput(&mm->num, &value); |