[Bf-blender-cvs] [c3764fe1e80] master: Cleanup: update doxy sections

Campbell Barton noreply at git.blender.org
Wed Mar 25 08:13:00 CET 2020


Commit: c3764fe1e80670cd578df7bbc5c37c267e81013a
Author: Campbell Barton
Date:   Wed Mar 25 16:36:01 2020 +1100
Branches: master
https://developer.blender.org/rBc3764fe1e80670cd578df7bbc5c37c267e81013a

Cleanup: update doxy sections

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

M	source/blender/editors/interface/view2d_ops.c
M	source/blender/editors/screen/screen_ops.c
M	source/blender/editors/space_outliner/outliner_collections.c
M	source/blender/editors/transform/transform_convert.c
M	source/blender/editors/transform/transform_input.c
M	source/blender/editors/transform/transform_mode.c
M	source/blender/editors/uvedit/uvedit_unwrap_ops.c
M	source/blender/windowmanager/intern/wm_files_link.c

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

diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 17af0cff23a..2adf441514b 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -62,7 +62,7 @@ static bool view2d_poll(bContext *C)
 /** \} */
 
 /* -------------------------------------------------------------------- */
-/** \name View Pan Operator
+/** \name View Pan Shared Utilities
  * \{ */
 
 /**
@@ -74,9 +74,9 @@ static bool view2d_poll(bContext *C)
  * - `deltax, deltay` - define how much to move view by (relative to zoom-correction factor)
  */
 
-/* ------------------ Shared 'core' stuff ---------------------- */
-
-/* temp customdata for operator */
+/**
+ * Temporary custom-data for operator.
+ */
 typedef struct v2dViewPanData {
   /** screen where view pan was initiated */
   bScreen *sc;
@@ -209,7 +209,11 @@ static void view_pan_exit(wmOperator *op)
   }
 }
 
-/* ------------------ Modal Drag Version (1) ---------------------- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name View Pan Operator (modal drag-pan)
+ * \{ */
 
 /* for 'redo' only, with no user input */
 static int view_pan_exec(bContext *C, wmOperator *op)
@@ -350,7 +354,11 @@ static void VIEW2D_OT_pan(wmOperatorType *ot)
   RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX);
 }
 
-/* ------------------ Scrollwheel Versions (2) ---------------------- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name View Pan Operator (single step)
+ * \{ */
 
 /* this operator only needs this single callback, where it calls the view_pan_*() methods */
 static int view_scrollright_exec(bContext *C, wmOperator *op)
@@ -541,7 +549,7 @@ static void VIEW2D_OT_scroll_up(wmOperatorType *ot)
 /** \} */
 
 /* -------------------------------------------------------------------- */
-/** \name View Zoom Operator (single-step)
+/** \name View Zoom Shared Utilities
  * \{ */
 
 /**
@@ -558,9 +566,9 @@ static void VIEW2D_OT_scroll_up(wmOperatorType *ot)
  *   amount to enlarge 'cur' by.
  */
 
-/* ------------------ 'Shared' stuff ------------------------ */
-
-/* temp customdata for operator */
+/**
+ * Temporary custom-data for operator.
+ */
 typedef struct v2dViewZoomData {
   View2D *v2d; /* view2d we're operating in */
   ARegion *region;
@@ -768,7 +776,11 @@ static void view_zoomstep_apply(bContext *C, wmOperator *op)
       C, vzd, zoom_to_pos, RNA_float_get(op->ptr, "zoomfacx"), RNA_float_get(op->ptr, "zoomfacy"));
 }
 
-/* --------------- Individual Operators ------------------- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name View Zoom Operator (single step)
+ * \{ */
 
 /* cleanup temp customdata  */
 static void view_zoomstep_exit(wmOperator *op)
@@ -1400,6 +1412,12 @@ static void VIEW2D_OT_zoom_border(wmOperatorType *ot)
   WM_operator_properties_gesture_box_zoom(ot);
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name NDOF Pan/Zoom Operator
+ * \{ */
+
 #ifdef WITH_INPUT_NDOF
 static int view2d_ndof_invoke(bContext *C, wmOperator *op, const wmEvent *event)
 {
@@ -1731,8 +1749,6 @@ enum {
   SCROLLHANDLE_MAX_OUTSIDE,
 } /*eV2DScrollerHandle_Zone*/;
 
-/* ------------------------ */
-
 /**
  * Check if mouse is within scroller handle.
  *
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 2506c7472e3..9c3534a88b1 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -4796,10 +4796,10 @@ static void SCREEN_OT_box_select(wmOperatorType *ot)
 
 /* -------------------------------------------------------------------- */
 /** \name Full Screen Back Operator
+ *
+ * Use for generic full-screen 'back' button.
  * \{ */
 
-/* *********************** generic fullscreen 'back' button *************** */
-
 static int fullscreen_back_exec(bContext *C, wmOperator *op)
 {
   bScreen *screen = CTX_wm_screen(C);
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index 8da085f436d..8563b7d8c24 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -53,6 +53,8 @@
 #include "outliner_intern.h" /* own include */
 
 /* -------------------------------------------------------------------- */
+/** \name Utility API
+ * \{ */
 
 bool outliner_is_collection_tree_element(const TreeElement *te)
 {
@@ -133,8 +135,30 @@ TreeTraversalAction outliner_find_selected_objects(TreeElement *te, void *custom
   return TRAVERSE_CONTINUE;
 }
 
+/**
+ * Populates the \param objects: ListBase with all the outliner selected objects
+ * We store it as (Object *)LinkData->data
+ * \param objects: expected to be empty
+ */
+void ED_outliner_selected_objects_get(const bContext *C, ListBase *objects)
+{
+  SpaceOutliner *soops = CTX_wm_space_outliner(C);
+  struct IDsSelectedData data = {{NULL}};
+  outliner_tree_traverse(
+      soops, &soops->tree, 0, TSE_SELECTED, outliner_find_selected_objects, &data);
+  LISTBASE_FOREACH (LinkData *, link, &data.selected_array) {
+    TreeElement *ten_selected = (TreeElement *)link->data;
+    Object *ob = (Object *)TREESTORE(ten_selected)->id;
+    BLI_addtail(objects, BLI_genericNodeN(ob));
+  }
+  BLI_freelistN(&data.selected_array);
+}
+
+/** \} */
+
 /* -------------------------------------------------------------------- */
-/* Poll functions. */
+/** \name Poll Functions
+ * \{ */
 
 bool ED_outliner_collections_editor_poll(bContext *C)
 {
@@ -148,7 +172,11 @@ static bool outliner_view_layer_collections_editor_poll(bContext *C)
   return (so != NULL) && (so->outlinevis == SO_VIEW_LAYER);
 }
 
-/********************************* New Collection ****************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name New Collection
+ * \{ */
 
 struct CollectionNewData {
   bool error;
@@ -237,7 +265,11 @@ void OUTLINER_OT_collection_new(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
-/**************************** Delete Collection ******************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Delete Collection
+ * \{ */
 
 struct CollectionEditData {
   Scene *scene;
@@ -369,7 +401,11 @@ void OUTLINER_OT_collection_delete(wmOperatorType *ot)
   RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
-/****************************** Select Objects *******************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Select/Deselect Collection Objects
+ * \{ */
 
 struct CollectionObjectsSelectData {
   bool error;
@@ -457,7 +493,11 @@ void OUTLINER_OT_collection_objects_deselect(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/************************** Duplicate Collection *****************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Duplicate Collection
+ * \{ */
 
 struct CollectionDuplicateData {
   TreeElement *te;
@@ -578,7 +618,11 @@ void OUTLINER_OT_collection_duplicate(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/**************************** Link Collection ******************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Link Collection
+ * \{ */
 
 static int collection_link_exec(bContext *C, wmOperator *op)
 {
@@ -636,7 +680,11 @@ void OUTLINER_OT_collection_link(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/************************** Instance Collection ******************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Instance Collection
+ * \{ */
 
 static int collection_instance_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -703,7 +751,11 @@ void OUTLINER_OT_collection_instance(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/************************** Exclude Collection ******************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Exclude Collection
+ * \{ */
 
 static TreeTraversalAction layer_collection_find_data_to_edit(TreeElement *te, void *customdata)
 {
@@ -945,7 +997,11 @@ void OUTLINER_OT_collection_indirect_only_clear(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/************************** Visibility Operators ******************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Visibility for Collection Operators
+ * \{ */
 
 static int collection_isolate_exec(bContext *C, wmOperator *op)
 {
@@ -1129,6 +1185,12 @@ void OUTLINER_OT_collection_hide_inside(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Enable/Disable Collection Operators
+ * \{ */
+
 static bool collection_flag_poll(bContext *C, bool clear, int flag)
 {
   if (!ED_outliner_collections_editor_poll(C)) {
@@ -1310,6 +1372,12 @@ struct OutlinerHideEditData {
   GSet *bases_to_edit;
 };
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Visibility for Collection & Object Operators
+ * \{ */
+
 static TreeTraversalAction outliner_hide_find_data_to_edit(TreeElement *te, void *customdata)
 {
   struct OutlinerHideEditData *data = customdata;
@@ -1433,21 +1501,4 @@ void OUTLINER_OT_unhide_all(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/**
- * Populates the \param objects: ListBase with all the outliner selected objects
- * We store it as (Object *)LinkData->data
- * \param objects: expected to be empty
- */
-void ED_outliner_selected_objects_get(const bContext *C, Lis

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list