giovedì 17 agosto 2017

Cammino quindi penso - 2017-08-17 - Una falsa ottimizzazione


Per usare espressioni tratte dalla programmazione lineare: non sempre la soluzione ottima locale è anche una soluzione ottima globale. Ma non vi preoccupate, nel video non sono così criptico! :-)

Etichette: , ,

lunedì 14 agosto 2017

Cammino quindi penso - 2017-08-14 - Come si taglia l'erba in Russia



Avete curiosità sulla Russia? Chiedete e cercherò di rispondervi! Intanto vi racconto quello che io ho trovato curioso. :-)

Etichette: , ,

giovedì 10 agosto 2017

Cammino quindi penso - 2017-08-10 - Cosmologia



Tutte le ipotesi sulla nascita dell'universo, con o senza l'intervento divino, sono ugualmente difficili da accettare per la nostra mente.

Etichette: ,

mercoledì 26 luglio 2017

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.

Etichette: , ,