[Bf-blender-cvs] [8d116e99569] master: Cleanup: use doxy sections

Campbell Barton noreply at git.blender.org
Wed Apr 1 07:23:10 CEST 2020


Commit: 8d116e99569f9d8a5f297686d2c0e0757fab6daf
Author: Campbell Barton
Date:   Wed Apr 1 16:19:32 2020 +1100
Branches: master
https://developer.blender.org/rB8d116e99569f9d8a5f297686d2c0e0757fab6daf

Cleanup: use doxy sections

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

M	source/blender/editors/curve/editcurve.c

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

diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 47dcc8538d6..c513410cfd9 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -81,6 +81,10 @@ static void adduplicateflagNurb(
 static bool curve_delete_segments(Object *obedit, View3D *v3d, const bool split);
 static bool curve_delete_vertices(Object *obedit, View3D *v3d);
 
+/* -------------------------------------------------------------------- */
+/** \name Utility Functions
+ * \{ */
+
 ListBase *object_editcurve_get(Object *ob)
 {
   if (ob && ELEM(ob->type, OB_CURVE, OB_SURF)) {
@@ -90,7 +94,11 @@ ListBase *object_editcurve_get(Object *ob)
   return NULL;
 }
 
-/* ******************* PRINTS ********************* */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Debug Printing
+ * \{ */
 
 #if 0
 void printknots(Object *obedit)
@@ -118,7 +126,11 @@ void printknots(Object *obedit)
 }
 #endif
 
-/* ********************* Shape keys *************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Shape keys
+ * \{ */
 
 static CVKeyIndex *init_cvKeyIndex(
     void *cv, int key_index, int nu_index, int pt_index, int vertex_index)
@@ -897,7 +909,11 @@ static void calc_shapeKeys(Object *obedit, ListBase *newnurbs)
   }
 }
 
-/* ********************* Amimation data *************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Animation Data
+ * \{ */
 
 static bool curve_is_animated(Curve *cu)
 {
@@ -1114,7 +1130,11 @@ int ED_curve_updateAnimPaths(Main *bmain, Curve *cu)
   return 1;
 }
 
-/* ********************* LOAD and MAKE *************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Edit Mode Conversion (Make & Load)
+ * \{ */
 
 static int *initialize_index_map(Object *obedit, int *r_old_totvert)
 {
@@ -1354,7 +1374,11 @@ void ED_curve_editnurb_free(Object *obedit)
   BKE_curve_editNurb_free(cu);
 }
 
-/******************** separate operator ***********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Separate Operator
+ * \{ */
 
 static int separate_exec(bContext *C, wmOperator *op)
 {
@@ -1495,7 +1519,11 @@ void CURVE_OT_separate(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/******************** split operator ***********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Split Operator
+ * \{ */
 
 static int curve_split_exec(bContext *C, wmOperator *op)
 {
@@ -1563,7 +1591,11 @@ void CURVE_OT_split(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/* ******************* FLAGS ********************* */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Flag Utility Functions
+ * \{ */
 
 static bool isNurbselUV(const Nurb *nu, int flag, int *r_u, int *r_v)
 {
@@ -2532,7 +2564,11 @@ static void adduplicateflagNurb(
   }
 }
 
-/**************** switch direction operator ***************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Switch Direction Operator
+ * \{ */
 
 static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -2591,7 +2627,11 @@ void CURVE_OT_switch_direction(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/****************** set weight operator *******************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Set Weight Operator
+ * \{ */
 
 static int set_goal_weight_exec(bContext *C, wmOperator *op)
 {
@@ -2654,7 +2694,11 @@ void CURVE_OT_spline_weight_set(wmOperatorType *ot)
   RNA_def_float_factor(ot->srna, "weight", 1.0f, 0.0f, 1.0f, "Weight", "", 0.0f, 1.0f);
 }
 
-/******************* set radius operator ******************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Set Radius Operator
+ * \{ */
 
 static int set_radius_exec(bContext *C, wmOperator *op)
 {
@@ -2718,7 +2762,11 @@ void CURVE_OT_radius_set(wmOperatorType *ot)
       ot->srna, "radius", 1.0f, 0.0f, OBJECT_ADD_SIZE_MAXF, "Radius", "", 0.0001f, 10.0f);
 }
 
-/********************* smooth operator ********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Smooth Vertices Operator
+ * \{ */
 
 static void smooth_single_bezt(BezTriple *bezt,
                                const BezTriple *bezt_orig_prev,
@@ -2875,12 +2923,15 @@ void CURVE_OT_smooth(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
+/** \} */
+
 /* -------------------------------------------------------------------- */
-/* Smooth radius/weight/tilt
+/** \name Smooth Operator (Radius/Weight/Tilt) Utilities
  *
- * TODO: make smoothing distance based
- * TODO: support cyclic curves
- */
+ * To do:
+ * - Make smoothing distance based.
+ * - Support cyclic curves.
+ * \{ */
 
 static void curve_smooth_value(ListBase *editnurb, const int bezt_offsetof, const int bp_offset)
 {
@@ -3059,6 +3110,12 @@ static void curve_smooth_value(ListBase *editnurb, const int bezt_offsetof, cons
   }
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Smooth Weight Operator
+ * \{ */
+
 static int curve_smooth_weight_exec(bContext *C, wmOperator *UNUSED(op))
 {
   ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -3096,6 +3153,12 @@ void CURVE_OT_smooth_weight(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Smooth Radius Operator
+ * \{ */
+
 static int curve_smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
 {
   ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -3133,6 +3196,12 @@ void CURVE_OT_smooth_radius(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Smooth Tilt Operator
+ * \{ */
+
 static int curve_smooth_tilt_exec(bContext *C, wmOperator *UNUSED(op))
 {
   ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -3170,7 +3239,11 @@ void CURVE_OT_smooth_tilt(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/********************** hide operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Hide Operator
+ * \{ */
 
 static int hide_exec(bContext *C, wmOperator *op)
 {
@@ -3269,7 +3342,11 @@ void CURVE_OT_hide(wmOperatorType *ot)
   RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
 }
 
-/********************** reveal operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Reveal Operator
+ * \{ */
 
 static int reveal_exec(bContext *C, wmOperator *op)
 {
@@ -3345,7 +3422,11 @@ void CURVE_OT_reveal(wmOperatorType *ot)
   RNA_def_boolean(ot->srna, "select", true, "Select", "");
 }
 
-/********************** subdivide operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Subdivide Operator
+ * \{ */
 
 /**
  * Divide the line segments associated with the currently selected
@@ -3800,7 +3881,11 @@ void CURVE_OT_subdivide(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
-/******************** find nearest ************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Cursor Picking API
+ * \{ */
 
 static void ED_curve_pick_vert__doClosest(
     void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, const float screen_co[2])
@@ -3972,7 +4057,11 @@ static void findselectedNurbvert(
   }
 }
 
-/***************** set spline type operator *******************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Set Spline Type Operator
+ * \{ */
 
 static int set_spline_type_exec(bContext *C, wmOperator *op)
 {
@@ -4069,7 +4158,11 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot)
                   "Use handles when converting bezier curves into polygons");
 }
 
-/***************** set handle type operator *******************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Set Handle Type Operator
+ * \{ */
 
 static int set_handle_type_exec(bContext *C, wmOperator *op)
 {
@@ -4127,7 +4220,11 @@ void CURVE_OT_handle_type_set(wmOperatorType *ot)
   ot->prop = RNA_def_enum(ot->srna, "type", editcurve_handle_type_items, 1, "Type", "Spline type");
 }
 
-/***************** recalculate handles operator **********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Recalculate Handles Operator
+ * \{ */
 
 static int curve_normals_make_consistent_exec(bContext *C, wmOperator *op)
 {
@@ -4175,9 +4272,13 @@ void CURVE_OT_normals_make_consistent(wmOperatorType *ot)
   RNA_def_boolean(ot->srna, "calc_length", false, "Length", "Recalculate handle length");
 }
 
-/***************** make segment operator **********************/
+/** \} */
 
-/* ******************** SKINNING LOFTING!!! ******************** */
+/* -------------------------------------------------------------------- */
+/** \name Make Segment Operator
+ *
+ * Also handles skinning & lofting.
+ * \{ */
 
 static void switchdirection_knots(float *base, int tot)
 {
@@ -4877,7 +4978,11 @@ void CURVE_OT_make_segment(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/***************** pick select from 3d view **********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Pick Select from 3D View
+ * \{ */
 
 bool ED_curve_editnurb_select_pick(
     bContext *C, const i

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list