PlayAnim: don't expand sequences when passing in multiple files

Only expand image sequences when a single file is passed in.
This allows shell globing to expand images without expanding each.

Prepare for support multiple file drag & drop where it also doesn't
make sense to expand sequences when dropping multiple files.
This commit is contained in:
Campbell Barton
2023-10-14 16:00:56 +11:00
parent e23cb0c743
commit b1cd144d7e

View File

@@ -1830,10 +1830,19 @@ static char *wm_main_playanim_intern(int argc, const char **argv)
GHOST_SwapWindowBuffers(ps.ghost_data.window);
/* One of the frames was invalid or not passed in. */
if (sfra == -1 || efra == -1) {
/* one of the frames was invalid, just use all images */
sfra = 1;
efra = MAXFRAME;
if (argc == 1) {
/* A single file was passed in, attempt to load all images from an image sequence.
* (if it is an image sequence). */
efra = MAXFRAME;
}
else {
/* Multiple files passed in, show each file without expanding image sequences.
* This occurs when dropping multiple files. */
efra = 1;
}
}
build_pict_list(