Why is there a separate option 4 exporting GIF files?

Having the current menu options was sensible when there were only 2 types of animated output files. BUT not now there are 5 including WEBM!

I’m thinking in terms of a simular interface to Export image one.

To my knowledge there was never any discussion or conscious choice to settle on this specific set of export options. Here are some contributing factors to note with no particular organization:

  • Features, including new export options, were developed and added slowly over time. When doing things this way, there is often a preference for extending rather than changing the existing way of doing things. Changes can force users relearn how to use existing features. People hate change. The benefit of modifying an existing interface has to be great enough to justify the inconvenience, obsolete tutorials, incessant support questions, etc.
  • Lots of users are looking to specifically export GIFs, or video. Far less have are concerned with the specific format of video, or have no preference between the two. So presenting both options right in the menu makes it easier for users to know that Pencil2D supports both options and makes it easier for the user to choose the one they want. Some redundancy is acceptable, desirable even, if it helps users access most-used features quickly.
  • You can break up the export options in many different ways, but whatever output formats are grouped together have to share the same export options dialog. The greater the differences in options within a group, the more complex the dialog has to be to accommodate these differences. A simple example of this is with the current Movie export. WebM and MP4 formats are grouped together, but only the WebM format supports transparency, so the transparency checkbox must be selectively enabled or disabled depending on the exact format chosen. These could be split up, but that would increase the number of upfront menu items as well as the number of distinct export dialogs that have to be maintained, tested, etc. Ideally the export formats are grouped in such a way to balance these conflicting interests.
    • In my personal opinion, the most sensible grouping would be into four categories: single images, image sequences, animated images, and videos. Each of these groups have fairly unique output properties with their own specific options. Videos have sound, single images do not have duration, image sequences output multiple files. This is pretty much the exact export menu options we already have, with the exception that the APNG format should be grouped with the Animated GIF.
  • Exporting to different formats can require different backends. ffmpeg is used to export videos and Animated GIFs (for now), but Qt is used to export images and image sequences. With the way the exporters are currently set up, it is best from a programming perspective to limit each export option to only a single backend. This reduces branching and coupling in our code.
    • You may notice the GIF export and Movie export actually use the same dialog, with some text changed and the transparency section hidden for GIFs. This is because they share the same backend and they are handled very similarly behind the scenes. They could technically be grouped together with very little difficulty, but for previously mentioned reasons, I don’t think this is a good idea.