Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_sequence.c
| Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | |||||
| * From a list of frames, compute the start (offset) and length of the sequence | * From a list of frames, compute the start (offset) and length of the sequence | ||||
| * of contiguous frames. If `detect_udim` is set, it will return UDIM tiles as well. | * of contiguous frames. If `detect_udim` is set, it will return UDIM tiles as well. | ||||
| */ | */ | ||||
| static void image_detect_frame_range(ImageFrameRange *range, const bool detect_udim) | static void image_detect_frame_range(ImageFrameRange *range, const bool detect_udim) | ||||
| { | { | ||||
| /* UDIM */ | /* UDIM */ | ||||
| if (detect_udim) { | if (detect_udim) { | ||||
| int udim_start, udim_range; | int udim_start, udim_range; | ||||
| bool result = BKE_image_get_tile_info( | range->udims_detected = BKE_image_get_tile_info( | ||||
| range->filepath, &range->udim_tiles, &udim_start, &udim_range); | range->filepath, &range->udim_tiles, &udim_start, &udim_range); | ||||
| if (result) { | if (range->udims_detected) { | ||||
| range->offset = udim_start; | range->offset = udim_start; | ||||
| range->length = udim_range; | range->length = udim_range; | ||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| /* Image Sequence */ | /* Image Sequence */ | ||||
| BLI_listbase_sort(&range->frames, image_cmp_frame); | BLI_listbase_sort(&range->frames, image_cmp_frame); | ||||
| ▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines | |||||