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 Stockner <lukas.stockner@freenet.de>2019-12-20 23:46:36 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2019-12-20 23:46:36 +0300
commitf9e65fcea72fb6c2c4d73b86066be9f0d63c2011 (patch)
tree204611a937b8b6a3e54b92e34adeaaee3b85aef2 /source/blender/blenkernel/intern/image.c
parente9093a6e494b9588027d41c64bee6e8f4a5b2f52 (diff)
Textures: Support UDIM images
This adds UDIM support to e.g. the Displacement modifier. The implementation is straightforward: If the image is tiled, lookup the tile based on UVs and shift the UVs into the tile's coordinates.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index fca81acf038..6d6e5166e1c 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -4652,6 +4652,9 @@ static void image_get_entry_and_index(Image *ima, ImageUser *iuser, int *r_entry
frame = iuser ? iuser->framenr : ima->lastframe;
}
}
+ else if (ima->source == IMA_SRC_TILED) {
+ frame = (iuser && iuser->tile) ? iuser->tile : 1001;
+ }
*r_entry = frame;
*r_index = index;