diff options
Diffstat (limited to 'source/blender/editors/armature/pose_slide.c')
-rw-r--r-- | source/blender/editors/armature/pose_slide.c | 64 |
1 files changed, 27 insertions, 37 deletions
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index d9621dba730..e60270bc3f0 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -251,7 +251,7 @@ static int pose_slide_init(bContext *C, wmOperator *op, ePoseSlide_Modes mode) */ BLI_dlrbTree_init(&pso->keys); - /* initialise numeric input */ + /* Initialize numeric input. */ initNumInput(&pso->num); pso->num.idx_max = 0; /* one axis */ pso->num.val_flag[0] |= NUM_NO_NEGATIVE; @@ -1122,7 +1122,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) do_pose_update = true; break; } - else if (event->val == KM_PRESS) { + if (event->val == KM_PRESS) { switch (event->type) { /* Transform Channel Limits */ /* XXX: Replace these hardcoded hotkeys with a modalmap that can be customised */ @@ -1307,11 +1307,10 @@ static int pose_slide_push_invoke(bContext *C, wmOperator *op, const wmEvent *ev pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } - /* initialise percentage so that it won't pop on first mouse move */ + pso = op->customdata; + + /* Initialize percentage so that it won't pop on first mouse move. */ pose_slide_mouse_update_percentage(pso, op, event); /* do common setup work */ @@ -1328,9 +1327,8 @@ static int pose_slide_push_exec(bContext *C, wmOperator *op) pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* do common exec work */ return pose_slide_exec_common(C, op, pso); @@ -1369,11 +1367,10 @@ static int pose_slide_relax_invoke(bContext *C, wmOperator *op, const wmEvent *e pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } - /* initialise percentage so that it won't pop on first mouse move */ + pso = op->customdata; + + /* Initialize percentage so that it won't pop on first mouse move. */ pose_slide_mouse_update_percentage(pso, op, event); /* do common setup work */ @@ -1390,9 +1387,8 @@ static int pose_slide_relax_exec(bContext *C, wmOperator *op) pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* do common exec work */ return pose_slide_exec_common(C, op, pso); @@ -1430,11 +1426,10 @@ static int pose_slide_push_rest_invoke(bContext *C, wmOperator *op, const wmEven pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } - /* initialise percentage so that it won't pop on first mouse move */ + pso = op->customdata; + + /* Initialize percentage so that it won't pop on first mouse move. */ pose_slide_mouse_update_percentage(pso, op, event); /* do common setup work */ @@ -1451,9 +1446,8 @@ static int pose_slide_push_rest_exec(bContext *C, wmOperator *op) pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* do common exec work */ return pose_slide_exec_common(C, op, pso); @@ -1492,11 +1486,10 @@ static int pose_slide_relax_rest_invoke(bContext *C, wmOperator *op, const wmEve pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } - /* initialise percentage so that it won't pop on first mouse move */ + pso = op->customdata; + + /* Initialize percentage so that it won't pop on first mouse move. */ pose_slide_mouse_update_percentage(pso, op, event); /* do common setup work */ @@ -1513,9 +1506,8 @@ static int pose_slide_relax_rest_exec(bContext *C, wmOperator *op) pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* do common exec work */ return pose_slide_exec_common(C, op, pso); @@ -1554,11 +1546,10 @@ static int pose_slide_breakdown_invoke(bContext *C, wmOperator *op, const wmEven pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } - /* initialise percentage so that it won't pop on first mouse move */ + pso = op->customdata; + + /* Initialize percentage so that it won't pop on first mouse move. */ pose_slide_mouse_update_percentage(pso, op, event); /* do common setup work */ @@ -1575,9 +1566,8 @@ static int pose_slide_breakdown_exec(bContext *C, wmOperator *op) pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* do common exec work */ return pose_slide_exec_common(C, op, pso); |