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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user