[Bf-blender-cvs] [b8952ecec94] master: Cleanup: Remove unused curve types from enum

Piotr Makal noreply at git.blender.org
Mon Dec 13 22:17:35 CET 2021


Commit: b8952ecec947308ded826d6025ddfe7d6ff0325e
Author: Piotr Makal
Date:   Mon Dec 13 15:13:47 2021 -0600
Branches: master
https://developer.blender.org/rBb8952ecec947308ded826d6025ddfe7d6ff0325e

Cleanup: Remove unused curve types from enum

There were a few unused enum values: `CU_CARDINAL` and `CU_BSPLINE`
This commit cleans them up from code as they were not used for
anything meaningful.

Differential Revision: https://developer.blender.org/D13554

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

M	source/blender/editors/curve/editcurve.c
M	source/blender/makesdna/DNA_curve_types.h
M	source/blender/makesrna/intern/rna_curve.c

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

diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 743b971de61..a034e4bb10e 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -3855,11 +3855,6 @@ static int set_spline_type_exec(bContext *C, wmOperator *op)
     const bool use_handles = RNA_boolean_get(op->ptr, "use_handles");
     const int type = RNA_enum_get(op->ptr, "type");
 
-    if (ELEM(type, CU_CARDINAL, CU_BSPLINE)) {
-      BKE_report(op->reports, RPT_ERROR, "Not yet implemented");
-      continue;
-    }
-
     LISTBASE_FOREACH (Nurb *, nu, editnurb) {
       if (ED_curve_nurb_select_check(v3d, nu)) {
         const int pntsu_prev = nu->pntsu;
@@ -3903,8 +3898,6 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot)
   static const EnumPropertyItem type_items[] = {
       {CU_POLY, "POLY", 0, "Poly", ""},
       {CU_BEZIER, "BEZIER", 0, "Bezier", ""},
-      //      {CU_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
-      //      {CU_BSPLINE, "B_SPLINE", 0, "B-Spline", ""},
       {CU_NURBS, "NURBS", 0, "NURBS", ""},
       {0, NULL, 0, NULL, NULL},
   };
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index dab43d16cbb..c1c8fe06121 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -420,10 +420,8 @@ enum {
 enum {
   CU_POLY = 0,
   CU_BEZIER = 1,
-  CU_BSPLINE = 2,
-  CU_CARDINAL = 3,
   CU_NURBS = 4,
-  CU_TYPE = (CU_POLY | CU_BEZIER | CU_BSPLINE | CU_CARDINAL | CU_NURBS),
+  CU_TYPE = (CU_POLY | CU_BEZIER | CU_NURBS),
 
   /* only for adding */
   CU_PRIMITIVE = 0xF00,
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 5dea3d32bbc..6cca0c51988 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -141,8 +141,6 @@ const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = {
 static const EnumPropertyItem curve_type_items[] = {
     {CU_POLY, "POLY", 0, "Poly", ""},
     {CU_BEZIER, "BEZIER", 0, "Bezier", ""},
-    {CU_BSPLINE, "BSPLINE", 0, "BSpline", ""},
-    {CU_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
     {CU_NURBS, "NURBS", 0, "Ease", ""},
     {0, NULL, 0, NULL, NULL},
 };



More information about the Bf-blender-cvs mailing list