[Bf-blender-cvs] [61d35c06a1e] master: Cleanup: use doxy sections

Campbell Barton noreply at git.blender.org
Wed May 6 04:45:21 CEST 2020


Commit: 61d35c06a1e97ce2c9e99b8fcfd99560300002a4
Author: Campbell Barton
Date:   Wed May 6 12:45:04 2020 +1000
Branches: master
https://developer.blender.org/rB61d35c06a1e97ce2c9e99b8fcfd99560300002a4

Cleanup: use doxy sections

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

M	source/blender/editors/gpencil/gpencil_edit.c

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

diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 197bb8e0cf2..fd6dc956bbc 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -90,8 +90,9 @@
 
 #include "gpencil_intern.h"
 
-/* ************************************************ */
-/* Stroke Edit Mode Management */
+/* -------------------------------------------------------------------- */
+/** \name Stroke Edit Mode Management
+ * \{ */
 
 /* poll callback for all stroke editing operators */
 static bool gp_stroke_edit_poll(bContext *C)
@@ -138,6 +139,12 @@ static bool gpencil_editmode_toggle_poll(bContext *C)
   return ED_gpencil_data_get_active(C) != NULL;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Toggle Edit Mode Operator
+ * \{ */
+
 static int gpencil_editmode_toggle_exec(bContext *C, wmOperator *op)
 {
   const int back = RNA_boolean_get(op->ptr, "back");
@@ -223,6 +230,12 @@ void GPENCIL_OT_editmode_toggle(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Toggle Select Mode Operator
+ * \{ */
+
 /* set select mode */
 static bool gpencil_selectmode_toggle_poll(bContext *C)
 {
@@ -298,7 +311,11 @@ void GPENCIL_OT_selectmode_toggle(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
 }
 
-/* Stroke Paint Mode Management */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Toggle Stroke Paint Mode Operator
+ * \{ */
 
 static bool gpencil_paintmode_toggle_poll(bContext *C)
 {
@@ -402,7 +419,11 @@ void GPENCIL_OT_paintmode_toggle(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
 }
 
-/* Stroke Sculpt Mode Management */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Toggle Stroke Sculpt Mode Operator
+ * \{ */
 
 static bool gpencil_sculptmode_toggle_poll(bContext *C)
 {
@@ -479,6 +500,12 @@ static int gpencil_sculptmode_toggle_exec(bContext *C, wmOperator *op)
   return OPERATOR_FINISHED;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Toggle Weight Paint Mode Operator
+ * \{ */
+
 void GPENCIL_OT_sculptmode_toggle(wmOperatorType *ot)
 {
   PropertyRNA *prop;
@@ -600,7 +627,11 @@ void GPENCIL_OT_weightmode_toggle(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
 }
 
-/* Vertex Paint Mode Management */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Toggle Vertex Paint Mode Operator
+ * \{ */
 
 static bool gpencil_vertexmode_toggle_poll(bContext *C)
 {
@@ -698,10 +729,11 @@ void GPENCIL_OT_vertexmode_toggle(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
 }
 
-/* ************************************************ */
-/* Stroke Editing Operators */
+/** \} */
 
-/* ************ Stroke Hide selection Toggle ************** */
+/* -------------------------------------------------------------------- */
+/** \name Stroke Hide Selection Toggle Operator
+ * \{ */
 
 static int gpencil_hideselect_toggle_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -740,7 +772,11 @@ void GPENCIL_OT_selection_opacity_toggle(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO | OPTYPE_REGISTER;
 }
 
-/* ************** Duplicate Selected Strokes **************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Duplicate Selected Strokes Operator
+ * \{ */
 
 /* Make copies of selected point segments in a selected stroke */
 static void gp_duplicate_points(const bGPDstroke *gps,
@@ -917,7 +953,11 @@ void GPENCIL_OT_duplicate(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/* ************** Extrude Selected Strokes **************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Extrude Selected Strokes Operator
+ * \{ */
 
 /* helper to copy a point to temp area */
 static void copy_move_point(bGPDstroke *gps,
@@ -1138,14 +1178,18 @@ void GPENCIL_OT_extrude(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/* ******************* Copy/Paste Strokes ************************* */
-/* Grease Pencil stroke data copy/paste buffer:
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Copy/Paste Strokes Utilities
+ *
+ * Grease Pencil stroke data copy/paste buffer:
  * - The copy operation collects all segments of selected strokes,
  *   dumping "ready to be copied" copies of the strokes into the buffer.
  * - The paste operation makes a copy of those elements, and adds them
  *   to the active layer. This effectively flattens down the strokes
  *   from several different layers into a single layer.
- */
+ * \{ */
 
 /* list of bGPDstroke instances */
 /* NOTE: is exposed within the editors/gpencil module so that other tools can use it too */
@@ -1257,8 +1301,11 @@ GHash *gp_copybuf_validate_colormap(bContext *C)
   return new_colors;
 }
 
-/* --------------------- */
-/* Copy selected strokes */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Copy Selected Strokes Operator
+ * \{ */
 
 static int gp_strokes_copy_exec(bContext *C, wmOperator *op)
 {
@@ -1375,8 +1422,11 @@ void GPENCIL_OT_copy(wmOperatorType *ot)
   // ot->flag = OPTYPE_REGISTER;
 }
 
-/* --------------------- */
-/* Paste selected strokes */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Paste Selected Strokes Operator
+ * \{ */
 
 static bool gp_strokes_paste_poll(bContext *C)
 {
@@ -1547,7 +1597,11 @@ void GPENCIL_OT_paste(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
-/* ******************* Move To Layer ****************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Move To Layer Operator
+ * \{ */
 
 static int gp_move_to_layer_exec(bContext *C, wmOperator *op)
 {
@@ -1667,7 +1721,11 @@ void GPENCIL_OT_move_to_layer(wmOperatorType *ot)
   RNA_def_property_flag(ot->prop, PROP_HIDDEN | PROP_SKIP_SAVE);
 }
 
-/* ********************* Add Blank Frame *************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Add Blank Frame Operator
+ * \{ */
 
 static int gp_blank_frame_add_exec(bContext *C, wmOperator *op)
 {
@@ -1741,7 +1799,11 @@ void GPENCIL_OT_blank_frame_add(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
-/* ******************* Delete Active Frame ************************ */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Delete Active Frame Operator
+ * \{ */
 
 static bool gp_actframe_delete_poll(bContext *C)
 {
@@ -1822,7 +1884,12 @@ void GPENCIL_OT_annotation_active_frame_delete(wmOperatorType *ot)
   ot->exec = gp_actframe_delete_exec;
   ot->poll = gp_annotation_actframe_delete_poll;
 }
-/* **************** Delete All Active Frames ****************** */
+
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Delete All Active Frames
+ * \{ */
 
 static bool gp_actframe_delete_all_poll(bContext *C)
 {
@@ -1883,7 +1950,11 @@ void GPENCIL_OT_active_frames_delete_all(wmOperatorType *ot)
   ot->poll = gp_actframe_delete_all_poll;
 }
 
-/* ******************* Delete Operator ************************ */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Delete/Dissolve Utilities
+ * \{ */
 
 typedef enum eGP_DeleteMode {
   /* delete selected stroke points */
@@ -1903,8 +1974,6 @@ typedef enum eGP_DissolveMode {
   GP_DISSOLVE_UNSELECT = 2,
 } eGP_DissolveMode;
 
-/* ----------------------------------- */
-
 /* Delete selected strokes */
 static int gp_delete_selected_strokes(bContext *C)
 {
@@ -2498,7 +2567,11 @@ int gp_delete_selected_point_wrap(bContext *C)
   return gp_delete_selected_points(C);
 }
 
-/* ----------------------------------- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Delete Operator
+ * \{ */
 
 static int gp_delete_exec(bContext *C, wmOperator *op)
 {
@@ -2557,6 +2630,12 @@ void GPENCIL_OT_delete(wmOperatorType *ot)
                           "Method used for deleting Grease Pencil data");
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Dissolve Operator
+ * \{ */
+
 static int gp_dissolve_exec(bContext *C, wmOperator *op)
 {
   eGP_DissolveMode mode = RNA_enum_get(op->ptr, "type");
@@ -2599,7 +2678,11 @@ void GPENCIL_OT_dissolve(wmOperatorType *ot)
                           "Method used for dissolving Stroke points");
 }
 
-/* ****************** Snapping - Strokes <-> Cursor ************************ */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Snapping Selection to Grid Operator
+ * \{ */
 
 /* Poll callback for snap operators */
 /* NOTE: For now, we only allow these in the 3D view, as other editors do not
@@ -2614,8 +2697,6 @@ static bool gp_snap_poll(bContext *C)
          ((area != NULL) && (area->spacetype == SPACE_VIEW3D));
 }
 
-/* --------------------------------- */
-
 static int gp_snap_to_grid(bContext *C, wmOperator *UNUSED(op))
 {
   bGPdata *gpd = ED_gpencil_data_get_active(C);
@@ -2690,7 +2771,11 @@ void GPENCIL_OT_snap_to_grid(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/* ------------------------------- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Snapping Selection to Cursor Operator
+ * \{ */
 
 static int gp_snap_to_cursor(bContext *C, wmOperator *op)
 {
@@ -2782,7 +2867,11 @@ void GPENCIL_OT_snap_to_cursor(wmOperatorType *ot)
                              "Offset the entire s

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list