[Bf-blender-cvs] [d61e1789417] soc-2019-bevel-profiles: - Re-re-enable first and last point handle "fix."

Hans Goudey noreply at git.blender.org
Thu Jul 11 04:00:17 CEST 2019


Commit: d61e178941798e1580ea4f4186ed41c31b195fdb
Author: Hans Goudey
Date:   Wed Jul 10 22:01:26 2019 -0400
Branches: soc-2019-bevel-profiles
https://developer.blender.org/rBd61e178941798e1580ea4f4186ed41c31b195fdb

- Re-re-enable first and last point handle "fix."

 - Better description of bug.

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

M	source/blender/blenkernel/intern/profile_widget.c

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

diff --git a/source/blender/blenkernel/intern/profile_widget.c b/source/blender/blenkernel/intern/profile_widget.c
index 9ddc415f3b5..07492631998 100644
--- a/source/blender/blenkernel/intern/profile_widget.c
+++ b/source/blender/blenkernel/intern/profile_widget.c
@@ -618,6 +618,10 @@ static int compare_curvature_bezt_edge_i(const BezTriple *bezt, const int i_a, c
  *        number of points used to define the profile (prwdgt->totpoint).
  * \param sample_straight_edges: Whether to sample points between vector handle control points. If
           this is true and there are only vector edges the straight edges will still be sampled. */
+/* HANS-TODO: The last segment is always a little too long. And in the non-sample_straight_edges
+ * case the second to last point can sometimes be forgotten for the sampling. */
+/* HANS-TODO: Enable proper sampling with fewer segments than points, probably using older sampling
+ * algorithms */
 void profilewidget_create_samples(const ProfileWidget *prwdgt,
                                   float *locations,
                                   int n_segments,
@@ -651,8 +655,7 @@ void profilewidget_create_samples(const ProfileWidget *prwdgt,
   }
   calchandle_profile(&bezt[totpoints - 1], &bezt[totpoints - 2], NULL);
 
-  /* HANS-TODO: Instead of this put the end handles pointing along the edge */
-  if (0 && prwdgt->totpoint > 2) {
+  if (prwdgt->totpoint > 2) {
     float hlen, nlen, vec[3];
 
     if (bezt[0].h2 == HD_AUTO) {



More information about the Bf-blender-cvs mailing list