[Bf-blender-cvs] [cf5d9cf2fc4] soc-2021-curve-fillet: Cleanup: Renoved redundant spline type check.

dilithjay noreply at git.blender.org
Mon Jul 26 05:07:15 CEST 2021


Commit: cf5d9cf2fc4797d36e7d92a410645bb7206ec72d
Author: dilithjay
Date:   Mon Jul 26 08:37:01 2021 +0530
Branches: soc-2021-curve-fillet
https://developer.blender.org/rBcf5d9cf2fc4797d36e7d92a410645bb7206ec72d

Cleanup: Renoved redundant spline type check.

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

M	release/scripts/addons
M	source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc

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

diff --git a/release/scripts/addons b/release/scripts/addons
index 1adb56d8b01..89ce3f1e1ca 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 1adb56d8b01cf1327f58c6fb8b1ccc8b7efd76ad
+Subproject commit 89ce3f1e1ca9f715b790cb3901001782d27bebea
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc
index 048f018893a..2fb1daf4d82 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc
@@ -444,11 +444,8 @@ static void update_poly_or_NURBS_positions(Array<FilletData> &fds,
   }
 }
 
-/*
- * Function to fillet either Bezier splines or Poly splines. Added under the same function because
- * the only difference is that Bezier curves have handle data.
- */
-static SplinePtr fillet_bez_or_poly_spline(const Spline &spline, const FilletModeParam &mode_param)
+/* Function to fillet a spline. */
+static SplinePtr fillet_spline(const Spline &spline, const FilletModeParam &mode_param)
 {
   int fillet_count, start = 0, size = spline.size();
   bool cyclic = spline.is_cyclic();
@@ -510,24 +507,6 @@ static SplinePtr fillet_bez_or_poly_spline(const Spline &spline, const FilletMod
   return dst_spline_ptr;
 }
 
-/* Function to fillet a spline. Appropriate function is called based on spline type. */
-static SplinePtr fillet_spline(const Spline &spline, const FilletModeParam &mode_param)
-{
-  switch (spline.type()) {
-    case Spline::Type::Bezier: {
-      return fillet_bez_or_poly_spline(spline, mode_param);
-    }
-    case Spline::Type::Poly: {
-      return fillet_bez_or_poly_spline(spline, mode_param);
-    }
-    case Spline::Type::NURBS: {
-      return fillet_bez_or_poly_spline(spline, mode_param);
-    }
-  }
-  SplinePtr new_spline = spline.copy();
-  return new_spline;
-}
-
 /* Function to fillet a curve */
 static std::unique_ptr<CurveEval> fillet_curve(const CurveEval &input_curve,
                                                const FilletModeParam &mode_param)



More information about the Bf-blender-cvs mailing list