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:
authorLukas Tönne <lukas.toenne@gmail.com>2022-07-26 00:43:48 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2022-07-26 00:43:48 +0300
commitf081e76037432cb926be45e980eac201d337032c (patch)
treedd1225521c12ea21c0b0c3d51ec1ae3f8730755f /source/blender/blenkernel/BKE_image.h
parentfa2084ae58a77b1201289b6bedac427f73c762d1 (diff)
parent462f99bf38648a08226b1fba423315aec2bc577b (diff)
Merge branch 'master' into geometry-nodes-iterative-cachegeometry-nodes-rigid-body-integration
Diffstat (limited to 'source/blender/blenkernel/BKE_image.h')
-rw-r--r--source/blender/blenkernel/BKE_image.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index 1f131568900..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"
@@ -97,7 +98,7 @@ int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, const struct ImageForm
*/
int BKE_imbuf_write_as(struct ImBuf *ibuf,
const char *name,
- struct ImageFormatData *imf,
+ const struct ImageFormatData *imf,
bool save_copy);
/**
@@ -195,6 +196,14 @@ struct Image *BKE_image_add_generated(struct Main *bmain,
struct Image *BKE_image_add_from_imbuf(struct Main *bmain, struct ImBuf *ibuf, const char *name);
/**
+ * For a non-viewer single-buffer image (single frame file, or generated image) replace its image
+ * buffer with the given one.
+ * If an unsupported image type (multi-layer, image sequence, ...) the function will assert in the
+ * debug mode and will have an undefined behavior in the release mode.
+ */
+void BKE_image_replace_imbuf(struct Image *image, struct ImBuf *ibuf);
+
+/**
* For reload, refresh, pack.
*/
void BKE_imageuser_default(struct ImageUser *iuser);
@@ -416,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]);