Caption generator addon for Blender

Doing yesterday's video was fun, but one thing that frustrated me a lot was the preparation of the subtitles; it frustrated me to such a point, that after doing just a couple of subtitles I decided to write a Blender addon which would do much of the hard work for me. So, welcome the Caption generator!

You can watch the video or read the description (or the code!) in Gitlab if you want to learn how to use it; what I care about writing here, is my impressions after writing my first Blender addon. Well, thanks to the easiness of the Python language and to a well documented internal API, writing this addon was very easy.
What I did find hard, and made me waste quite some time without even finding a good solution, was how to open the file selection dialog only after the user had clicked over a "Generate" button on the addon's side panel. The addon API's invoke() method doesn't seem to be well documented, and the example I found in the Blender stackexchange did fix that issue while introducing new ones. So I gave up on this, and just let my addon fire up the file selection dialog as soon as it's activated.

Summing up, writing an addon for Blender is extremely easy; polishing it to make it behave exactly as you wish might be a challenge (depending on your requirements, of course). But all in all, I suspect that I'll write more Blender addons, should I find some actions which I wish to automate.


There's also webmention support.