[Bf-blender-cvs] [e03810693c0] master: Cleanup: use doxy-comments and `r_` prefix return arguments

Campbell Barton noreply at git.blender.org
Mon Apr 11 07:43:21 CEST 2022


Commit: e03810693c06a09ba570a957af52cce9a6d3cbe3
Author: Campbell Barton
Date:   Mon Apr 11 15:42:28 2022 +1000
Branches: master
https://developer.blender.org/rBe03810693c06a09ba570a957af52cce9a6d3cbe3

Cleanup: use doxy-comments and `r_` prefix return arguments

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

M	source/blender/blenkernel/BKE_image.h
M	source/blender/blenkernel/intern/image.cc

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

diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index fba2512fa49..fff3b2a8f89 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -329,7 +329,7 @@ void BKE_image_merge(struct Main *bmain, struct Image *dest, struct Image *sourc
 bool BKE_image_scale(struct Image *image, int width, int height);
 
 /**
- * Check if texture has alpha (planes == 32 || planes == 16).
+ * Check if texture has alpha `planes == 32 || planes == 16`.
  */
 bool BKE_image_has_alpha(struct Image *image);
 
@@ -350,13 +350,13 @@ void BKE_image_get_tile_label(struct Image *ima,
  * Checks whether the given filepath refers to a UDIM tiled texture.
  * If yes, the range from the lowest to the highest tile is returned.
  *
- * `filepath` may be modified to ensure a UDIM token is present.
- * `tiles` may be filled even if the result ultimately is false!
+ * \param filepath: may be modified to ensure a UDIM token is present.
+ * \param tiles: may be filled even if the result ultimately is false!
  */
 bool BKE_image_get_tile_info(char *filepath,
                              struct ListBase *tiles,
-                             int *tile_start,
-                             int *tile_range);
+                             int *r_tile_start,
+                             int *r_tile_range);
 
 struct ImageTile *BKE_image_add_tile(struct Image *ima, int tile_number, const char *label);
 bool BKE_image_remove_tile(struct Image *ima, struct ImageTile *tile);
@@ -385,7 +385,7 @@ typedef enum {
 void BKE_image_ensure_tile_token(char *filename);
 
 /**
- * When provided with an absolute virtual filepath, check to see if at least
+ * When provided with an absolute virtual `filepath`, check to see if at least
  * one concrete file exists.
  * Note: This function requires directory traversal and may be inefficient in time-critical,
  * or iterative, code paths.
@@ -394,8 +394,8 @@ bool BKE_image_tile_filepath_exists(const char *filepath);
 
 /**
  * Retrieves the UDIM token format and returns the pattern from the provided `filepath`.
- * The returned pattern is typically passed to either `BKE_image_get_tile_number_from_filepath` or
- * `BKE_image_set_filepath_from_tile_number`.
+ * The returned pattern is typically passed to either #BKE_image_get_tile_number_from_filepath or
+ * #BKE_image_set_filepath_from_tile_number.
  */
 char *BKE_image_get_tile_strformat(const char *filepath, eUDIM_TILE_FORMAT *r_tile_format);
 bool BKE_image_get_tile_number_from_filepath(const char *filepath,
diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc
index b1385eab9cf..6100923778d 100644
--- a/source/blender/blenkernel/intern/image.cc
+++ b/source/blender/blenkernel/intern/image.cc
@@ -3096,7 +3096,7 @@ void BKE_image_get_tile_label(Image *ima, ImageTile *tile, char *label, int len_
   }
 }
 
-bool BKE_image_get_tile_info(char *filepath, ListBase *tiles, int *tile_start, int *tile_range)
+bool BKE_image_get_tile_info(char *filepath, ListBase *tiles, int *r_tile_start, int *r_tile_range)
 {
   char filename[FILE_MAXFILE], dirname[FILE_MAXDIR];
   BLI_split_dirfile(filepath, dirname, filename, sizeof(dirname), sizeof(filename));
@@ -3138,8 +3138,8 @@ bool BKE_image_get_tile_info(char *filepath, ListBase *tiles, int *tile_start, i
   if (is_udim && min_udim <= IMA_UDIM_MAX) {
     BLI_join_dirfile(filepath, FILE_MAX, dirname, filename);
 
-    *tile_start = min_udim;
-    *tile_range = max_udim - min_udim + 1;
+    *r_tile_start = min_udim;
+    *r_tile_range = max_udim - min_udim + 1;
     return true;
   }
   return false;



More information about the Bf-blender-cvs mailing list