[Bf-blender-cvs] [9edd3299bcf] soc-2021-curves: Clamped t between 0.1 and 0.9

dilithjay noreply at git.blender.org
Sat Dec 25 13:28:02 CET 2021


Commit: 9edd3299bcfa737436167fe1148808b66d60d931
Author: dilithjay
Date:   Sun Dec 19 17:31:39 2021 +0530
Branches: soc-2021-curves
https://developer.blender.org/rB9edd3299bcfa737436167fe1148808b66d60d931

Clamped t between 0.1 and 0.9

===================================================================

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 0ca8f4c2712..791dab77577 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -787,11 +787,7 @@ static void move_segment(MoveSegmentData *seg_data, const wmEvent *event, ViewCo
   BezTriple *bezt1 = nu->bezt + seg_data->bezt_index;
   BezTriple *bezt2 = BKE_nurb_bezt_get_next(nu, bezt1);
 
-  const float t = seg_data->t;
-
-  if (min_ff(t, 1.0f - t) < 0.1f) {
-    return;
-  }
+  const float t = max_ff(min_ff(seg_data->t, 0.9f), 0.1f);
 
   const float t_sq = t * t;
   const float t_cu = t_sq * t;



More information about the Bf-blender-cvs mailing list