[Bf-blender-cvs] [d20b08281e0] master: Cleanup: naming for library link enum

Campbell Barton noreply at git.blender.org
Tue Sep 8 08:51:25 CEST 2020


Commit: d20b08281e0e5cf47b7b549910b6f5ab7f61e57d
Author: Campbell Barton
Date:   Tue Sep 8 16:41:55 2020 +1000
Branches: master
https://developer.blender.org/rBd20b08281e0e5cf47b7b549910b6f5ab7f61e57d

Cleanup: naming for library link enum

Use 'e' prefix, update comments.

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

M	source/blender/blenloader/BLO_readfile.h
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/windowmanager/intern/wm_files_link.c

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

diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index c83d8e037c8..4571e50dd36 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -142,13 +142,15 @@ bool BLO_library_path_explode(const char *path, char *r_dir, char **r_group, cha
 /** \name BLO Blend File Linking API
  * \{ */
 
-/* Options controlling behavior of append/link code.
- * Note: merged with 'user-level' options from operators etc. in 16 lower bits
- *       (see eFileSel_Params_Flag in DNA_space_types.h). */
-typedef enum BLO_LibLinkFlags {
-  /* Generate a placeholder (empty ID) if not found in current lib file. */
+/**
+ * Options controlling behavior of append/link code.
+ * \note merged with 'user-level' options from operators etc. in 16 lower bits
+ * (see #eFileSel_Params_Flag in DNA_space_types.h).
+ */
+typedef enum eBLOLibLinkFlags {
+  /** Generate a placeholder (empty ID) if not found in current lib file. */
   BLO_LIBLINK_USE_PLACEHOLDERS = 1 << 16,
-  /* Force loaded ID to be tagged as LIB_TAG_INDIRECT (used in reload context only). */
+  /** Force loaded ID to be tagged as #LIB_TAG_INDIRECT (used in reload context only). */
   BLO_LIBLINK_FORCE_INDIRECT = 1 << 17,
   /**
    * When set, tag ID types that pass the internal check #library_link_idcode_needs_tag_check
@@ -158,7 +160,7 @@ typedef enum BLO_LibLinkFlags {
    * don't need to remember to set this flag.
    */
   BLO_LIBLINK_NEEDS_ID_TAG_DOIT = 1 << 18,
-} BLO_LinkFlags;
+} eBLOLibLinkFlags;
 
 /**
  * Struct for passing arguments to
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 7778a3aa234..92cf9d21e07 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -801,8 +801,10 @@ typedef enum eFileSel_Action {
 } eFileSel_Action;
 
 /* sfile->params->flag */
-/* Note: short flag, also used as 16 lower bits of flags in link/append code
- *       (WM and BLO code area, see BLO_LibLinkFlags in BLO_readfile.h). */
+/**
+ * \note short flag, also used as 16 lower bits of flags in link/append code
+ * (WM and BLO code area, see #eBLOLibLinkFlags in BLO_readfile.h).
+ */
 typedef enum eFileSel_Params_Flag {
   FILE_PARAMS_FLAG_UNUSED_1 = (1 << 0), /* cleared */
   FILE_RELPATH = (1 << 1),
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 6c7205b25d4..559eb6a78c2 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -159,8 +159,9 @@ typedef struct WMLinkAppendData {
   LinkNodePair items;
   int num_libraries;
   int num_items;
-  /** Combines #eFileSel_Params_Flag from DNA_space_types.h and
-   * BLO_LibLinkFlags from BLO_readfile.h */
+  /**
+   * Combines #eFileSel_Params_Flag from DNA_space_types.h & #eBLOLibLinkFlags from BLO_readfile.h
+   */
   int flag;
 
   /* Internal 'private' data */
@@ -402,7 +403,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
     scene = NULL;
   }
 
-  /* We need to add nothing from BLO_LibLinkFlags to flag here. */
+  /* We need to add nothing from #eBLOLibLinkFlags to flag here. */
 
   /* from here down, no error returns */



More information about the Bf-blender-cvs mailing list