[Bf-blender-cvs] [12c07361a8f] soc-2021-curves: Added `ed_` prefix to exposed functions

dilithjay noreply at git.blender.org
Sat Nov 6 08:45:14 CET 2021


Commit: 12c07361a8fe08289147b3d1c3cfa7dd3fea870e
Author: dilithjay
Date:   Fri Nov 5 19:55:45 2021 +0530
Branches: soc-2021-curves
https://developer.blender.org/rB12c07361a8fe08289147b3d1c3cfa7dd3fea870e

Added `ed_` prefix to exposed functions

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

M	source/blender/editors/curve/curve_intern.h
M	source/blender/editors/curve/editcurve.c
M	source/blender/editors/curve/editcurve_pen.c

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

diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index dd45681bb8a..f42f0c14037 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -144,13 +144,13 @@ void ED_curve_keyindex_update_nurb(struct EditNurb *editnurb, struct Nurb *nu, s
 /* exported for editcurve_pen.c */
 bool ed_editcurve_extrude(Curve *cu, EditNurb *editnurb, View3D *v3d);
 int ed_editcurve_addvert(Curve *cu, EditNurb *editnurb, View3D *v3d, const float location_init[3]);
-bool curve_toggle_cyclic(View3D *v3d, ListBase *editnurb, int direction);
-void dissolve_bez_segment(BezTriple *bezt_prev,
-                          BezTriple *bezt_next,
-                          const Nurb *nu,
-                          const Curve *cu,
-                          const uint span_len,
-                          const uint span_step[2]);
+bool ed_curve_toggle_cyclic(View3D *v3d, ListBase *editnurb, int direction);
+void ed_dissolve_bez_segment(BezTriple *bezt_prev,
+                             BezTriple *bezt_next,
+                             const Nurb *nu,
+                             const Curve *cu,
+                             const uint span_len,
+                             const uint span_step[2]);
 
 /* helper functions */
 void ed_editnurb_translate_flag(struct ListBase *editnurb,
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 765138cefc8..bc06883c782 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -5713,7 +5713,7 @@ void CURVE_OT_extrude(wmOperatorType *ot)
 /** \name Make Cyclic Operator
  * \{ */
 
-bool curve_toggle_cyclic(View3D *v3d, ListBase *editnurb, int direction)
+bool ed_curve_toggle_cyclic(View3D *v3d, ListBase *editnurb, int direction)
 {
   BezTriple *bezt;
   BPoint *bp;
@@ -5810,7 +5810,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
     }
 
     ListBase *editnurb = object_editcurve_get(obedit);
-    if (curve_toggle_cyclic(v3d, editnurb, direction)) {
+    if (ed_curve_toggle_cyclic(v3d, editnurb, direction)) {
       changed_multi = true;
       WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
       DEG_id_tag_update(obedit->data, 0);
@@ -6496,12 +6496,12 @@ static bool test_bezt_is_sel_any(const void *bezt_v, void *user_data)
   return BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt);
 }
 
-void dissolve_bez_segment(BezTriple *bezt_prev,
-                          BezTriple *bezt_next,
-                          const Nurb *nu,
-                          const Curve *cu,
-                          const uint span_len,
-                          const uint span_step[2])
+void ed_dissolve_bez_segment(BezTriple *bezt_prev,
+                             BezTriple *bezt_next,
+                             const Nurb *nu,
+                             const Curve *cu,
+                             const uint span_len,
+                             const uint span_step[2])
 {
   int i_span_edge_len = span_len + 1;
   const uint dims = 3;
@@ -6595,7 +6595,7 @@ static int curve_dissolve_exec(bContext *C, wmOperator *UNUSED(op))
           BezTriple *bezt_prev = &nu->bezt[mod_i(span_step[0] - 1, nu->pntsu)];
           BezTriple *bezt_next = &nu->bezt[mod_i(span_step[1] + 1, nu->pntsu)];
 
-          dissolve_bez_segment(bezt_prev, bezt_next, nu, cu, span_len, span_step);
+          ed_dissolve_bez_segment(bezt_prev, bezt_next, nu, cu, span_len, span_step);
         }
       }
     }
diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index cdb0f006511..f8479b9eabd 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -851,7 +851,7 @@ static bool make_cyclic_if_endpoints(
          (nu->bp && bp != sel_bp && (bp == nu->bp || bp == nu->bp + nu->pntsu - 1)))) {
       View3D *v3d = CTX_wm_view3d(C);
       ListBase *editnurb = object_editcurve_get(vc->obedit);
-      curve_toggle_cyclic(v3d, editnurb, 0);
+      ed_curve_toggle_cyclic(v3d, editnurb, 0);
       return true;
     }
   }
@@ -980,7 +980,7 @@ static int curve_pen_modal(bContext *C, wmOperator *op, const wmEvent *event)
             if (next_bezt && prev_bezt) {
               const int bez_index = BKE_curve_nurb_vert_index_get(nu, bezt);
               uint span_step[2] = {bez_index, bez_index};
-              dissolve_bez_segment(prev_bezt, next_bezt, nu, cu, 1, span_step);
+              ed_dissolve_bez_segment(prev_bezt, next_bezt, nu, cu, 1, span_step);
             }
             delete_bezt_from_nurb(bezt, nu);
           }



More information about the Bf-blender-cvs mailing list