Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-07-22 06:05:26 +0300
committerCampbell Barton <campbell@blender.org>2022-07-22 06:07:24 +0300
commit08c5d99e88ee3e9f807dfe69c188660eae347f31 (patch)
tree7e4298800487b17a43c289462420507c35e4bb2b /source/blender/blenkernel/BKE_image.h
parent72e249974aa7f6a3bd6d5c35c5d5e59cd1c3bded (diff)
Cleanup: add BKE_image_find_nearest_tile_with_offset
Every caller BKE_image_find_nearest_tile was calculating the tile offset so add a version of this function that returns the offset too.
Diffstat (limited to 'source/blender/blenkernel/BKE_image.h')
-rw-r--r--source/blender/blenkernel/BKE_image.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index 4e622a5708f..e3c249e56f9 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -6,6 +6,7 @@
* \ingroup bke
*/
+#include "BLI_compiler_attrs.h"
#include "BLI_utildefines.h"
#include "BLI_rect.h"
@@ -424,7 +425,11 @@ void BKE_image_get_tile_uv(const struct Image *ima, const int tile_number, float
/**
* Return the tile_number for the closest UDIM tile.
*/
-int BKE_image_find_nearest_tile(const struct Image *image, const float co[2]);
+int BKE_image_find_nearest_tile_with_offset(const struct Image *image,
+ const float co[2],
+ float r_uv_offset[2]) ATTR_NONNULL(1, 2, 3);
+int BKE_image_find_nearest_tile(const struct Image *image, const float co[2])
+ ATTR_NONNULL(1, 2) ATTR_WARN_UNUSED_RESULT;
void BKE_image_get_size(struct Image *image, struct ImageUser *iuser, int *r_width, int *r_height);
void BKE_image_get_size_fl(struct Image *image, struct ImageUser *iuser, float r_size[2]);