From b3dc1a17a0e7b7e38a8ece70ca0d353aff82c154 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 7 Jan 2022 15:13:31 +1100 Subject: 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. --- source/blender/blenloader/intern/versioning_300.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenloader') 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); } } } -- cgit v1.2.3