zynaddsubfx / user-manual

User manual (this may or may not get merged into zynaddsubfx/zynaddsubfx's doc dir)
30 stars 10 forks source link

Automated screenshot generation #5

Open unfa opened 6 years ago

unfa commented 6 years ago

In the Goals.adoc I've created two ideas for a system that could let us create and update screenshots automatically without having to re-shoot them all when the look of Zyn-Fusion changes.

I've asked @fundamental and he said it should be possible to have Zyn-Fusion provide screenshots itself from requested UI elements.

Maybe we could define a protocol to describe what should be screenshoted, maybe even ow it should be anotated and have all that be done automatically.

Then hopefully running one command will update all screenshots in the manual for a new Zyn-Fusion UI look or layout.

fundamental commented 6 years ago

Maybe we could define a protocol to describe what should be screenshoted, maybe even how it should be anotated and have all that be done automatically.

I started working on a first pass of the system, but wasn't happy with how it was turning out. Essentially for this to work we need a domain specific language to convey the sequence of actions needed to obtain the screenshots.

This includes:

Setting up the waiting for events can be handled by a DAG. OSC and view changes are simple enough. Some work has to be put into the screenshot-ing, but that's fairly step by step coding.

Identifying the region of interest in an easy to use approach is trickier. I'm thinking you say "I want to see something that contains '.Pvolume' and '.Pstretch'" or something like that to build up a region of interest.

Beyond that the exact semantics of how you specify this series of commands is undecided.

fundamental commented 6 years ago

This functionality was implemented while at LAC. There is one bug with respect to obtaining the opengl context.

It makes it possible to change views, schedule events, send osc messages, define smaller regions within the GUI to take pictures of. Certainly there are also usability/quailty-of-life enhancements which should be added as well.

https://github.com/mruby-zest/mruby-zest-build/blob/master/scratch.rb is the current script to capture images that I've been using to build the system.

Comments/suggestions for improvement are welcome.

unfa commented 5 years ago

Awesome!

fundamental commented 5 years ago

See https://github.com/mruby-zest/mruby-zest-build/blob/master/user-manual-screenshots.rb for a more complete example for images which are currently used in the user manual. Images from newer changes still need to be added.