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.
This commit is contained in:
2022-01-07 15:13:31 +11:00
parent 2cd8238ce3
commit b3dc1a17a0
4 changed files with 10 additions and 9 deletions

View File

@@ -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);
}
}
}