From 86baf6e3edc8925c0701786550b2bac8fe5203d3 Mon Sep 17 00:00:00 2001 From: Jesse Yurkovich Date: Fri, 27 May 2022 22:11:52 -0700 Subject: Re-fix T97366: Support single-file UDIMs The original fix for T97366 was too restrictive and breaks real-world cases of single-file UDIM textures. See D13297 for an example. This patch effectively reverts the original fix and instead fixes the downstream code to accept single-file ranges as necessary. Note: This means it is very important for users to make use of the "UDIM detection" option during `image.open` or drag n' drop scenarios in order to declare their intent when loading their files. Differential Revision: https://developer.blender.org/D14853 --- source/blender/blenkernel/BKE_image.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenkernel/BKE_image.h') diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 42d0e66cf49..0417f335d11 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -378,6 +378,11 @@ typedef enum { UDIM_TILE_FORMAT_UVTILE = 2 } eUDIM_TILE_FORMAT; +/** + * Checks if the filename portion of the path contains a UDIM token. + */ +bool BKE_image_is_filename_tokenized(char *filepath); + /** * Ensures that `filename` contains a UDIM token if we find a supported format pattern. * \note This must only be the name component (without slashes). -- cgit v1.2.3