[Bf-blender-cvs] [9416004092c] master: Cleanup: use doxygen comments & sections for animation files

Campbell Barton noreply at git.blender.org
Wed Mar 9 06:30:17 CET 2022


Commit: 9416004092c5db4b16e8c3f241f3ae789c8789bc
Author: Campbell Barton
Date:   Wed Mar 9 16:29:22 2022 +1100
Branches: master
https://developer.blender.org/rB9416004092c5db4b16e8c3f241f3ae789c8789bc

Cleanup: use doxygen comments & sections for animation files

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

M	source/blender/editors/animation/anim_intern.h
M	source/blender/editors/animation/keyframing.c
M	source/blender/editors/include/ED_anim_api.h

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

diff --git a/source/blender/editors/animation/anim_intern.h b/source/blender/editors/animation/anim_intern.h
index e7277c51cd3..8d8d624c69b 100644
--- a/source/blender/editors/animation/anim_intern.h
+++ b/source/blender/editors/animation/anim_intern.h
@@ -14,49 +14,80 @@ extern ListBase builtin_keyingsets;
 
 /* Operator Define Prototypes ------------------- */
 
-/* Main Keyframe Management operators:
- * These handle keyframes management from various spaces. They only make use of
- * Keying Sets.
- */
+/* -------------------------------------------------------------------- */
+/** \name Main Keyframe Management operators
+ *
+ * These handle keyframes management from various spaces.
+ * They only make use of Keying Sets.
+ * \{ */
+
 void ANIM_OT_keyframe_insert(struct wmOperatorType *ot);
 void ANIM_OT_keyframe_delete(struct wmOperatorType *ot);
 void ANIM_OT_keyframe_insert_by_name(struct wmOperatorType *ot);
 void ANIM_OT_keyframe_delete_by_name(struct wmOperatorType *ot);
 
-/* Main Keyframe Management operators:
- * These handle keyframes management from various spaces. They will handle the menus
- * required for each space.
- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Main Keyframe Management operators
+ *
+ * These handle keyframes management from various spaces.
+ * They will handle the menus required for each space.
+ * \{ */
+
 void ANIM_OT_keyframe_insert_menu(struct wmOperatorType *ot);
 
 void ANIM_OT_keyframe_delete_v3d(struct wmOperatorType *ot);
 void ANIM_OT_keyframe_clear_v3d(struct wmOperatorType *ot);
 
-/* Keyframe management operators for UI buttons (RMB menu). */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Keyframe management operators for UI buttons (RMB menu)
+ * \{ */
+
 void ANIM_OT_keyframe_insert_button(struct wmOperatorType *ot);
 void ANIM_OT_keyframe_delete_button(struct wmOperatorType *ot);
 void ANIM_OT_keyframe_clear_button(struct wmOperatorType *ot);
 
-/* .......... */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name KeyingSet management operators for UI buttons (RMB menu)
+ * \{ */
 
-/* KeyingSet management operators for UI buttons (RMB menu) */
 void ANIM_OT_keyingset_button_add(struct wmOperatorType *ot);
 void ANIM_OT_keyingset_button_remove(struct wmOperatorType *ot);
 
-/* KeyingSet management operators for RNA collections/UI buttons */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name KeyingSet management operators for RNA collections/UI buttons
+ * \{ */
+
 void ANIM_OT_keying_set_add(struct wmOperatorType *ot);
 void ANIM_OT_keying_set_remove(struct wmOperatorType *ot);
 void ANIM_OT_keying_set_path_add(struct wmOperatorType *ot);
 void ANIM_OT_keying_set_path_remove(struct wmOperatorType *ot);
 
-/* KeyingSet general operators */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name KeyingSet general operators
+ * \{ */
+
 void ANIM_OT_keying_set_active_set(struct wmOperatorType *ot);
 
-/* .......... */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Driver management operators for UI buttons (RMB menu)
+ * \{ */
 
-/* Driver management operators for UI buttons (RMB menu) */
 void ANIM_OT_driver_button_add(struct wmOperatorType *ot);
 void ANIM_OT_driver_button_remove(struct wmOperatorType *ot);
 void ANIM_OT_driver_button_edit(struct wmOperatorType *ot);
 void ANIM_OT_copy_driver_button(struct wmOperatorType *ot);
 void ANIM_OT_paste_driver_button(struct wmOperatorType *ot);
+
+/** \} */
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index feb78ce293e..90c127b620b 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -244,7 +244,7 @@ FCurve *ED_action_fcurve_ensure(struct Main *bmain,
   return fcu;
 }
 
-/* Helper for update_autoflags_fcurve() */
+/** Helper for #update_autoflags_fcurve(). */
 static void update_autoflags_fcurve_direct(FCurve *fcu, PropertyRNA *prop)
 {
   /* set additional flags for the F-Curve (i.e. only integer values) */
@@ -304,7 +304,8 @@ void update_autoflags_fcurve(FCurve *fcu, bContext *C, ReportList *reports, Poin
 /* ************************************************** */
 /* KEYFRAME INSERTION */
 
-/* Move the point where a key is about to be inserted to be inside the main cycle range.
+/**
+ * Move the point where a key is about to be inserted to be inside the main cycle range.
  * Returns the type of the cycle if it is enabled and valid.
  */
 static eFCU_Cycle_Type remap_cyclic_keyframe_location(FCurve *fcu, float *px, float *py)
@@ -345,7 +346,7 @@ static eFCU_Cycle_Type remap_cyclic_keyframe_location(FCurve *fcu, float *px, fl
   return type;
 }
 
-/* Used to make curves newly added to a cyclic Action cycle with the correct period. */
+/** Used to make curves newly added to a cyclic Action cycle with the correct period. */
 static void make_new_fcurve_cyclic(const bAction *act, FCurve *fcu)
 {
   /* The curve must contain one (newly-added) keyframe. */
@@ -652,11 +653,13 @@ enum {
   KEYNEEDED_DELNEXT,
 } /*eKeyNeededStatus*/;
 
-/* This helper function determines whether a new keyframe is needed */
-/* Cases where keyframes should not be added:
- * 1. Keyframe to be added between two keyframes with similar values
- * 2. Keyframe to be added on frame where two keyframes are already situated
- * 3. Keyframe lies at point that intersects the linear line between two keyframes
+/**
+ * This helper function determines whether a new keyframe is needed.
+ *
+ * Cases where keyframes should not be added:
+ * 1. Keyframe to be added between two keyframes with similar values.
+ * 2. Keyframe to be added on frame where two keyframes are already situated.
+ * 3. Keyframe lies at point that intersects the linear line between two keyframes.
  */
 static short new_key_needed(FCurve *fcu, float cFrame, float nValue)
 {
@@ -769,7 +772,7 @@ static short new_key_needed(FCurve *fcu, float cFrame, float nValue)
 
 /* ------------------ RNA Data-Access Functions ------------------ */
 
-/* Try to read value using RNA-properties obtained already */
+/** Try to read value using RNA-properties obtained already. */
 static float *setting_get_rna_values(
     PointerRNA *ptr, PropertyRNA *prop, float *buffer, int buffer_size, int *r_count)
 {
@@ -844,7 +847,8 @@ enum {
   VISUALKEY_SCA,
 };
 
-/* This helper function determines if visual-keyframing should be used when
+/**
+ * This helper function determines if visual-keyframing should be used when
  * inserting keyframes for the given channel. As visual-keyframing only works
  * on Object and Pose-Channel blocks, this should only get called for those
  * blocktypes, when using "standard" keying but 'Visual Keying' option in Auto-Keying
@@ -1012,7 +1016,8 @@ static bool visualkey_can_use(PointerRNA *ptr, PropertyRNA *prop)
   return false;
 }
 
-/* This helper function extracts the value to use for visual-keyframing
+/**
+ * This helper function extracts the value to use for visual-keyframing
  * In the event that it is not possible to perform visual keying, try to fall-back
  * to using the default method. Assumes that all data it has been passed is valid.
  */
@@ -1305,7 +1310,7 @@ bool insert_keyframe_direct(ReportList *reports,
   return insert_keyframe_value(reports, &ptr, prop, fcu, anim_eval_context, curval, keytype, flag);
 }
 
-/* Find or create the FCurve based on the given path, and insert the specified value into it. */
+/** Find or create the #FCurve based on the given path, and insert the specified value into it. */
 static bool insert_keyframe_fcurve_value(Main *bmain,
                                          ReportList *reports,
                                          PointerRNA *ptr,
@@ -1829,9 +1834,10 @@ enum {
   COMMONKEY_MODE_DELETE,
 } /*eCommonModifyKey_Modes*/;
 
-/* Polling callback for use with ANIM_*_keyframe() operators
+/**
+ * Polling callback for use with `ANIM_*_keyframe()` operators
  * This is based on the standard ED_operator_areaactive callback,
- * except that it does special checks for a few spacetypes too...
+ * except that it does special checks for a few space-types too.
  */
 static bool modify_key_op_poll(bContext *C)
 {
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 4b6f5e4cac6..3402d45fa96 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -51,8 +51,9 @@ struct PropertyRNA;
 /** \name Context
  * \{ */
 
-/* This struct defines a structure used for animation-specific
- * 'context' information
+/**
+ * This struct defines a structure used for animation-specific
+ * 'context' information.
  */
 typedef struct bAnimContext {
   /** data to be filtered for use in animation editor */
@@ -118,8 +119,9 @@ typedef enum eAnimCont_Types {
 /** \name Channels
  * \{ */
 
-/* This struct defines a structure used for quick and uniform access for
- * channels of animation data
+/**
+ * This struct defines a structure used for quick and uniform access for
+ * channels of animation data.
  */
 typedef struct bAnimListElem {
   struct bAnimListElem *next, *prev;
@@ -257,7 +259,8 @@ typedef enum eAnim_KeyType {
   ALE_GROUP, /* Action Group summary */
 } eAnim_KeyType;
 
-/* Flags for specifying the types of updates (i.e. recalculation/refreshing) that
+/**
+ * Flags for specifying the types of updates (i.e. recalculation/refreshing) that
  * needs to be performed to the data contained in a channel following editing.
  * For use with ANIM_animdata_update()
  */
@@ -379,13 +382,13 @@ typedef enum eAnimFilter_Flags {
 #define EXPANDED_DRVD(adt) ((adt->flag & ADT_DRIVERS_COLLAPSED) == 0)
 
 /* Actions (also used for Dopesheet) */
-/* Action Channel Group */
+/** Action Channel Group. */
 #define EDITABLE_AGRP(agrp) (((agrp)->flag & AGRP_PROTECTED) == 0)
 #define EXPANDED_AGRP(ac, agrp) \
   (((!(ac) || ((ac)->spacetype != SPACE_GRAPH)) && ((agrp)->flag & AGRP

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list