[Bf-blender-cvs] [622567511e7] soc-2021-curves: Lock angle works with hold rather than toggle
Dilith Jayakody
noreply at git.blender.org
Fri Feb 4 18:41:17 CET 2022
Commit: 622567511e7412147045f88618233ceccb468bcf
Author: Dilith Jayakody
Date: Thu Feb 3 22:43:02 2022 +0530
Branches: soc-2021-curves
https://developer.blender.org/rB622567511e7412147045f88618233ceccb468bcf
Lock angle works with hold rather than toggle
===================================================================
M source/blender/editors/curve/editcurve_pen.c
===================================================================
diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index 9cd461c8a1d..daec4f079f7 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -102,9 +102,7 @@ typedef struct CurvePenData {
bool link_handles_pressed;
/* Whether the current state of the moved handle is linked. */
bool link_handles;
- /* Whether shortcut for linking handles was pressed. */
- bool lock_angle_pressed;
- /* Whether the current state of the moved handle is linked. */
+ /* Whether the current state of the handle angle is locked. */
bool lock_angle;
/* Whether some action was done. Used for select. */
bool acted;
@@ -1572,18 +1570,7 @@ static int curve_pen_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
}
cpd->link_handles_pressed = is_extra_key_pressed(event, link_handles);
-
- if (!cpd->lock_angle_pressed && is_extra_key_pressed(event, lock_angle)) {
- cpd->lock_angle = !cpd->lock_angle;
- if (cpd->lock_angle) {
- move_all_selected_points(nurbs, false, false, cpd, event, &vc);
- }
- else {
- // Recalculate offset after lock angle is turned off
- cpd->offset_calc = false;
- }
- }
- cpd->lock_angle_pressed = is_extra_key_pressed(event, lock_angle);
+ cpd->lock_angle = is_extra_key_pressed(event, lock_angle);
const bool move_entire_pressed = is_extra_key_pressed(event, move_entire);
More information about the Bf-blender-cvs
mailing list