[Bf-blender-cvs] [1ee32ea228f] master: Cleanup: use doxy sections

Campbell Barton noreply at git.blender.org
Fri Jun 19 05:19:35 CEST 2020


Commit: 1ee32ea228f209673c51cc61fdf6387781239aff
Author: Campbell Barton
Date:   Fri Jun 19 13:17:10 2020 +1000
Branches: master
https://developer.blender.org/rB1ee32ea228f209673c51cc61fdf6387781239aff

Cleanup: use doxy sections

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

M	source/blender/editors/object/object_vgroup.c

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

diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index fb79cfb910e..87b31028dc1 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -77,7 +77,10 @@
 
 #include "object_intern.h"
 
-/************************ Exported Functions **********************/
+/* -------------------------------------------------------------------- */
+/** \name Public Utility Functions
+ * \{ */
+
 static bool vertex_group_use_vert_sel(Object *ob)
 {
   if (ob->mode == OB_MODE_EDIT) {
@@ -682,7 +685,11 @@ static void vgroup_copy_active_to_sel(Object *ob, eVGroupSelect subset_type)
   MEM_freeN((void *)vgroup_validmap);
 }
 
-/***********************Start weight transfer (WT)*********************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Shared Weight Transfer Operator Properties
+ * \{ */
 
 static const EnumPropertyItem WT_vertex_group_select_item[] = {
     {WT_VGROUP_ACTIVE, "ACTIVE", 0, "Active Group", "The active Vertex Group"},
@@ -779,7 +786,15 @@ static void vgroup_operator_subset_select_props(wmOperatorType *ot, bool use_act
   ot->prop = prop;
 }
 
-/***********************End weight transfer (WT)***********************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name High Level Vertex Group Add/Remove
+ *
+ * Wrap lower level `BKE` functions.
+ *
+ * \note that operations on many vertices should use #ED_vgroup_parray_alloc.
+ * \{ */
 
 /* for Mesh in Object mode */
 /* allows editmode for Lattice */
@@ -976,7 +991,11 @@ void ED_vgroup_select_by_name(Object *ob, const char *name)
   ob->actdef = BKE_object_defgroup_name_index(ob, name) + 1;
 }
 
-/********************** Operator Implementations *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Operator Function Implementations
+ * \{ */
 
 /* only in editmode */
 static void vgroup_select_verts(Object *ob, int select)
@@ -2634,7 +2653,11 @@ static void vgroup_assign_verts(Object *ob, const float weight)
   }
 }
 
-/********************** vertex group operators *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Shared Operator Poll Functions
+ * \{ */
 
 static bool vertex_group_poll(bContext *C)
 {
@@ -2783,6 +2806,12 @@ static bool vertex_group_vert_select_mesh_poll(bContext *C)
   return (BKE_object_is_in_editmode_vgroup(ob) || BKE_object_is_in_wpaint_select_vert(ob));
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Add Operator
+ * \{ */
+
 static int vertex_group_add_exec(bContext *C, wmOperator *UNUSED(op))
 {
   Object *ob = ED_object_context(C);
@@ -2811,6 +2840,12 @@ void OBJECT_OT_vertex_group_add(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Remove Operator
+ * \{ */
+
 static int vertex_group_remove_exec(bContext *C, wmOperator *op)
 {
   Object *ob = ED_object_context(C);
@@ -2858,6 +2893,12 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Assign Operator
+ * \{ */
+
 static int vertex_group_assign_exec(bContext *C, wmOperator *UNUSED(op))
 {
   ToolSettings *ts = CTX_data_tool_settings(C);
@@ -2888,6 +2929,12 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
   ot->flag = /*OPTYPE_REGISTER|*/ OPTYPE_UNDO;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Assign New Operator
+ * \{ */
+
 /* NOTE: just a wrapper around vertex_group_assign_exec(), except we add these to a new group */
 static int vertex_group_assign_new_exec(bContext *C, wmOperator *op)
 {
@@ -2917,6 +2964,12 @@ void OBJECT_OT_vertex_group_assign_new(wmOperatorType *ot)
   ot->flag = /*OPTYPE_REGISTER|*/ OPTYPE_UNDO;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Remove From Operator
+ * \{ */
+
 static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
 {
   const bool use_all_groups = RNA_boolean_get(op->ptr, "use_all_groups");
@@ -2968,6 +3021,12 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Select Operator
+ * \{ */
+
 static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op))
 {
   Object *ob = ED_object_context(C);
@@ -2998,6 +3057,12 @@ void OBJECT_OT_vertex_group_select(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Deselect Operator
+ * \{ */
+
 static int vertex_group_deselect_exec(bContext *C, wmOperator *UNUSED(op))
 {
   Object *ob = ED_object_context(C);
@@ -3037,6 +3102,12 @@ static int vertex_group_copy_exec(bContext *C, wmOperator *UNUSED(op))
   return OPERATOR_FINISHED;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Copy Operator
+ * \{ */
+
 void OBJECT_OT_vertex_group_copy(wmOperatorType *ot)
 {
   /* identifiers */
@@ -3074,6 +3145,12 @@ static int vertex_group_levels_exec(bContext *C, wmOperator *op)
   return OPERATOR_FINISHED;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Levels Operator
+ * \{ */
+
 void OBJECT_OT_vertex_group_levels(wmOperatorType *ot)
 {
   /* identifiers */
@@ -3115,6 +3192,12 @@ static int vertex_group_normalize_exec(bContext *C, wmOperator *UNUSED(op))
   }
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Normalize Operator
+ * \{ */
+
 void OBJECT_OT_vertex_group_normalize(wmOperatorType *ot)
 {
   /* identifiers */
@@ -3158,6 +3241,12 @@ static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op)
   }
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Normalize All Operator
+ * \{ */
+
 void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot)
 {
   /* identifiers */
@@ -3182,6 +3271,12 @@ void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot)
                   "Keep the values of the active group while normalizing others");
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Fix Position Operator
+ * \{ */
+
 static int vertex_group_fix_exec(bContext *C, wmOperator *op)
 {
   Object *ob = CTX_data_active_object(C);
@@ -3259,6 +3354,12 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
       1.f);
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Lock Operator
+ * \{ */
+
 static int vertex_group_lock_exec(bContext *C, wmOperator *op)
 {
   Object *ob = CTX_data_active_object(C);
@@ -3361,6 +3462,12 @@ void OBJECT_OT_vertex_group_lock(wmOperatorType *ot)
                "Apply the action based on vertex group selection");
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Invert Operator
+ * \{ */
+
 static int vertex_group_invert_exec(bContext *C, wmOperator *op)
 {
   Object *ob = ED_object_context(C);
@@ -3410,6 +3517,12 @@ void OBJECT_OT_vertex_group_invert(wmOperatorType *ot)
                   "Remove verts from groups that have zero weight after inverting");
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Invert Operator
+ * \{ */
+
 static int vertex_group_smooth_exec(bContext *C, wmOperator *op)
 {
   const float fac = RNA_float_get(op->ptr, "factor");
@@ -3482,6 +3595,12 @@ void OBJECT_OT_vertex_group_smooth(wmOperatorType *ot)
                 1.0f);
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Clean Operator
+ * \{ */
+
 static int vertex_group_clean_exec(bContext *C, wmOperator *op)
 {
   Object *ob = ED_object_context(C);
@@ -3535,6 +3654,12 @@ void OBJECT_OT_vertex_group_clean(wmOperatorType *ot)
                   "Keep verts assigned to at least one group when cleaning");
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Quantize Operator
+ * \{ */
+
 static int vertex_group_quantize_exec(bContext *C, wmOperator *op)
 {
   Object *ob = ED_object_context(C);
@@ -3574,6 +3699,12 @@ void OBJECT_OT_vertex_group_quantize(wmOperatorType *ot)
   RNA_def_int(ot->srna, "steps", 4, 1, 1000, "Steps", "Number of steps between 0 and 1", 1, 100);
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Limit Total Operator
+ * \{ */
+
 static int vertex_group_limit_total_exec(bContext *C, wmOperator *op)
 {
   Object *ob = ED_object_context(C);
@@ -3625,6 +3756,12 @@ void OBJECT_OT_vertex_group_limit_total(wmOperatorType *ot)
   RNA_def_int(ot->srna, "limit", 4, 1, 32, "Limit", "Maximum number of deform weights", 1, 32);
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Mirror Operator
+ * \{ */
+
 static int vertex_group_mirror_exec(bContext *C, wmOperator *op)
 {
   Object *ob = ED_object_context(C);
@@ -3677,6 +3814,12 @@ void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot)
       "Use topology based mirroring (for when both sides of mesh have matching, unique topology)");
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Vertex Group Copy t

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list