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-01-07 07:13:31 +0300
committerCampbell Barton <campbell@blender.org>2022-01-07 07:15:08 +0300
commitb3dc1a17a0e7b7e38a8ece70ca0d353aff82c154 (patch)
tree2eec6693f681341e9b9235ed639489aa3d217eb3 /source/blender/blenloader
parent2cd8238ce3394aa3cf89c4d8c17c71757dd61a08 (diff)
Fix BKE_image_ensure_tile_token being called with a full path
Assert that only the file name component is passed in since special handling for UDIM should only be applied to the file name. Also remove an unnecessary NULL check on the filename argument.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_300.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 5cfc937acf1..152684db8f1 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -824,7 +824,8 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports))
/* Ensure tiled image sources contain a UDIM token. */
LISTBASE_FOREACH (Image *, ima, &bmain->images) {
if (ima->source == IMA_SRC_TILED) {
- BKE_image_ensure_tile_token(ima->filepath);
+ char *filename = (char *)BLI_path_basename(ima->filepath);
+ BKE_image_ensure_tile_token(filename);
}
}
}