[Bf-blender-cvs] [3c097af51f7] master: Cleanup: use doxy sections for node_group.c

Campbell Barton noreply at git.blender.org
Fri Nov 6 06:25:28 CET 2020


Commit: 3c097af51f7e3fcf837e8f08d34dc56035b8893a
Author: Campbell Barton
Date:   Fri Nov 6 16:14:43 2020 +1100
Branches: master
https://developer.blender.org/rB3c097af51f7e3fcf837e8f08d34dc56035b8893a

Cleanup: use doxy sections for node_group.c

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

M	source/blender/editors/space_node/node_group.c
M	source/blender/editors/space_node/node_view.c
M	source/blender/nodes/intern/node_common.c
M	source/blender/nodes/intern/node_util.c

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

diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c
index cda07bb1233..654b95858bb 100644
--- a/source/blender/editors/space_node/node_group.c
+++ b/source/blender/editors/space_node/node_group.c
@@ -60,7 +60,11 @@
 #include "NOD_socket.h"
 #include "node_intern.h" /* own include */
 
-static bool node_group_operator_active(bContext *C)
+/* -------------------------------------------------------------------- */
+/** \name Local Utilities
+ * \{ */
+
+static bool node_group_operator_active_poll(bContext *C)
 {
   if (ED_operator_node_active(C)) {
     SpaceNode *snode = CTX_wm_space_node(C);
@@ -134,7 +138,11 @@ static bNode *node_group_get_active(bContext *C, const char *node_idname)
   return NULL;
 }
 
-/* ***************** Edit Group operator ************* */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Edit Group Operator
+ * \{ */
 
 static int node_group_edit_exec(bContext *C, wmOperator *op)
 {
@@ -171,7 +179,7 @@ void NODE_OT_group_edit(wmOperatorType *ot)
 
   /* api callbacks */
   ot->exec = node_group_edit_exec;
-  ot->poll = node_group_operator_active;
+  ot->poll = node_group_operator_active_poll;
 
   /* flags */
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -179,10 +187,16 @@ void NODE_OT_group_edit(wmOperatorType *ot)
   RNA_def_boolean(ot->srna, "exit", false, "Exit", "");
 }
 
-/* ******************** Ungroup operator ********************** */
+/** \} */
 
-/* The given paths will be owned by the returned instance. Both pointers are allowed to point to
- * the same string. */
+/* -------------------------------------------------------------------- */
+/** \name Ungroup Operator
+ * \{ */
+
+/**
+ * The given paths will be owned by the returned instance.
+ * Both pointers are allowed to point to the same string.
+ */
 static AnimationBasePathChange *animation_basepath_change_new(const char *src_basepath,
                                                               const char *dst_basepath)
 {
@@ -424,7 +438,11 @@ void NODE_OT_group_ungroup(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/* ******************** Separate operator ********************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Separate Operator
+ * \{ */
 
 /* returns 1 if its OK */
 static int node_group_separate_selected(
@@ -636,7 +654,11 @@ void NODE_OT_group_separate(wmOperatorType *ot)
   RNA_def_enum(ot->srna, "type", node_group_separate_types, NODE_GS_COPY, "Type", "");
 }
 
-/* ****************** Make Group operator ******************* */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Make Group Operator
+ * \{ */
 
 static bool node_group_make_use_node(bNode *node, bNode *gnode)
 {
@@ -1038,7 +1060,11 @@ void NODE_OT_group_make(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/* ****************** Group Insert operator ******************* */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Group Insert Operator
+ * \{ */
 
 static int node_group_insert_exec(bContext *C, wmOperator *op)
 {
@@ -1088,3 +1114,5 @@ void NODE_OT_group_insert(wmOperatorType *ot)
   /* flags */
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
+
+/** \} */
diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c
index ef7e7874c63..3c861896d37 100644
--- a/source/blender/editors/space_node/node_view.c
+++ b/source/blender/editors/space_node/node_view.c
@@ -55,7 +55,9 @@
 #include "NOD_composite.h"
 #include "node_intern.h" /* own include */
 
-/* **************** View All Operator ************** */
+/* -------------------------------------------------------------------- */
+/** \name View All Operator
+ * \{ */
 
 int space_node_view_flag(
     bContext *C, SpaceNode *snode, ARegion *region, const int node_flag, const int smooth_viewtx)
@@ -151,6 +153,12 @@ void NODE_OT_view_all(wmOperatorType *ot)
   ot->flag = 0;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name View Selected Operator
+ * \{ */
+
 static int node_view_selected_exec(bContext *C, wmOperator *op)
 {
   ARegion *region = CTX_wm_region(C);
@@ -178,7 +186,11 @@ void NODE_OT_view_selected(wmOperatorType *ot)
   ot->flag = 0;
 }
 
-/* **************** Background Image Operators ************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Background Image Operators
+ * \{ */
 
 typedef struct NodeViewMove {
   int mvalo[2];
@@ -284,6 +296,12 @@ void NODE_OT_backimage_move(wmOperatorType *ot)
   ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_CURSOR_XY;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Background Image Zoom
+ * \{ */
+
 static int backimage_zoom_exec(bContext *C, wmOperator *op)
 {
   SpaceNode *snode = CTX_wm_space_node(C);
@@ -316,6 +334,12 @@ void NODE_OT_backimage_zoom(wmOperatorType *ot)
   RNA_def_float(ot->srna, "factor", 1.2f, 0.0f, 10.0f, "Factor", "", 0.0f, 10.0f);
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Background Image Fit
+ * \{ */
+
 static int backimage_fit_exec(bContext *C, wmOperator *UNUSED(op))
 {
   Main *bmain = CTX_data_main(C);
@@ -372,7 +396,11 @@ void NODE_OT_backimage_fit(wmOperatorType *ot)
   ot->flag = OPTYPE_BLOCKING;
 }
 
-/******************** sample backdrop operator ********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Sample Backdrop Operator
+ * \{ */
 
 typedef struct ImageSampleInfo {
   ARegionType *art;
@@ -642,3 +670,5 @@ void NODE_OT_backimage_sample(wmOperatorType *ot)
   /* flags */
   ot->flag = OPTYPE_BLOCKING;
 }
+
+/** \} */
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index aa1f23163a0..36b9098d972 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -47,7 +47,9 @@ enum {
   REFINE_BACKWARD = 1 << 1,
 };
 
-/**** Group ****/
+/* -------------------------------------------------------------------- */
+/** \name Node Group
+ * \{ */
 
 bNodeSocket *node_group_find_input_socket(bNode *groupnode, const char *identifier)
 {
@@ -193,7 +195,11 @@ void node_group_update(struct bNodeTree *ntree, struct bNode *node)
   }
 }
 
-/**** FRAME ****/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Node Frame
+ * \{ */
 
 static void node_frame_init(bNodeTree *UNUSED(ntree), bNode *node)
 {
@@ -219,7 +225,11 @@ void register_node_type_frame(void)
   nodeRegisterType(ntype);
 }
 
-/* **************** REROUTE ******************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Node Re-Route
+ * \{ */
 
 /* simple, only a single input and output here */
 static void node_reroute_update_internal_links(bNodeTree *ntree, bNode *node)
@@ -403,7 +413,11 @@ void BKE_node_tree_unlink_id(ID *id, struct bNodeTree *ntree)
   }
 }
 
-/**** GROUP_INPUT / GROUP_OUTPUT ****/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Node #GROUP_INPUT / #GROUP_OUTPUT
+ * \{ */
 
 static void node_group_input_init(bNodeTree *ntree, bNode *node)
 {
@@ -599,3 +613,5 @@ void register_node_type_group_output(void)
 
   nodeRegisterType(ntype);
 }
+
+/** \} */
diff --git a/source/blender/nodes/intern/node_util.c b/source/blender/nodes/intern/node_util.c
index b2309abe32e..a5d61332a90 100644
--- a/source/blender/nodes/intern/node_util.c
+++ b/source/blender/nodes/intern/node_util.c
@@ -43,7 +43,9 @@
 
 #include "node_util.h"
 
-/**** Storage Data ****/
+/* -------------------------------------------------------------------- */
+/** \name Storage Data
+ * \{ */
 
 void node_free_curves(bNode *node)
 {
@@ -77,7 +79,11 @@ void *node_initexec_curves(bNodeExecContext *UNUSED(context),
   return NULL; /* unused return */
 }
 
-/**** Updates ****/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Updates
+ * \{ */
 
 void node_sock_label(bNodeSocket *sock, const char *name)
 {
@@ -173,7 +179,11 @@ void node_math_update(bNodeTree *UNUSED(ntree), bNode *node)
   }
 }
 
-/**** Labels ****/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Labels
+ * \{ */
 
 void node_blend_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int maxlen)
 {
@@ -222,7 +232,11 @@ void node_filter_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int m
   BLI_strncpy(label, IFACE_(name), maxlen);
 }
 
-/*** Link Insertion ***/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Link Insertion
+ * \{ */
 
 /* test if two sockets are interchangeable */
 static bool node_link_socket_match(bNodeSocket *a, bNodeSocket *b)
@@ -321,12 +335,17 @@ void node_insert_link_default(bNodeTree *ntree, bNode *node, bNodeLink *link)
   }
 }
 
-/**** Internal Links (mute and disconnect) ****/
+/** \} */
 
-/* common datatype priorities, works for compositor, shader and texture nodes alike
+/* -------------------------------------------------------------------- */
+/** \name Internal Links (mute and disconnect)
+ * \{ */
+
+/**
+ * Common datatype priorities, works for compositor, shader and texture nodes alike
  * defines priority of datatype connection based on output type (to):
- *   < 0  : never connect these types
- *   >= 0 : priority of connection (higher values chosen first)
+ * `<  0`: never connect these types.
+ * `>= 0`: priority of connection (higher values chosen first).
  */
 static int node_datatype_priority(eNodeSocketDatatype from, eNodeSocketDatatype to)
 {
@@ -507,7 +526,11 @@ void node_update_internal_links_default(bNodeTree *ntree, bNode *node)
   }
 }
 
-/**** Default value RNA access ****/
+/** \} */
+
+/* ------------------------------------------------------

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list