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

This commit is contained in:
Campbell Barton 2022-04-11 15:42:28 +10:00
parent 5e47056e8d
commit e03810693c
2 changed files with 11 additions and 11 deletions

View File

@ -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,

View File

@ -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;