MyPaintEdSlides


#1

Dear MyPaint-Community,

I’ve started a small project, aiming at converting MyPaints .ora files
into an .html presentation. For this task, I used python to
read, compose the .ora files and generate a reveal.js presentation.

A first result can be seen here:
https://github.com/SteffenPL/MyPaintEdSlides

Demo slides:
https://steffenpl.github.io/MyPaintEdSlides/test/output_complete/index.html

Now, I was wondering if maybe this could be converted or recreated into a proper MyPaint feature
oder Add-On? The basic idea is to allow exporting layers into a “presentation format”.

I’m may interested in writing a plugin on my own, but I can’t foresee how difficult it is
to write small GUI elements and add them to MyPaint.

I would love to get feedback on the idea, any kind of hints or suggestions!

There is some feature I would like to implement for my project, but I don’t know how:
Is there some way to get “real-time” access to MyPaints current layers?
I would love to be able to “paint” on the slides during the presentation.
(Optionally with having a proper MyPaint window on a second screen
and only the content of the active frame being visible for the audience.)

Kind regards
Steffen

Background
I’m using MyPaint in a rather unusual way, primarily for mathematics.
Making notes and creating nice sheets to explain maths in a fun way works great for me.


#2

Very cool idea!

I’d start here:
https://github.com/mypaint/mypaint/blob/master/gui/tileddrawwidget.py#L1336-L1386

and maybe work your way backwards a bit, figure out how to create a new window and render a “2nd” copy of the drawing surface into the new window. I think the new window will probably have different dimensions (since the toolbars and such affect the rendering window size) so you’d want fully render it.

As far as showing the “active layer” only, if you hold down CTRL and hit the eye-ball icon you can activate a single-layer-only mode that would be nice for slidehow. However, in this mode it doesn’t seem like the background is rendered so maybe that can be a small feature request to have that available (or maybe there is a way to turn it on that I can’t see).


#3

Thanks for the positive feedback and also for pointing me to the python class to start with. Let’s see how far I get.

About the “active layer only” mode:
I think pressing “Pos1” (or clicking View->Single Layer) does the job already, i.e. it disables all layers except the current one and the background.

For me that’s not really relevant, since in my case each slide is a combination of multiple layers.
That’s more or less the core of my idea, since to explain mathematical proofs, it’s crucial to
do it step by step. The names of the layers define currently, which layers are combined together
into one slide. (For example ‘x:ab*’ defines a slide containting layer ‘a’,‘b’ and all layers from the previous slide. And ‘x’ is the new internal name of the layer for further referencing.)
If I would use one layer for each slide, it would be really time consuming to
fix mistakes in the first step of a proof, since I then would need to change multiple layers equally.)


#4

Have you considered using layer “Groups” instead of names to organize the slideshow? For instance, maybe each top level layer group is an individual “slide”. Then, within that group, each layer is the animation step that the up/down arrows reveals?

Maybe further levels of groups can make it easier to manage the steps. Maybe a new toggle button (similar to the lock icon) on a layer/group would indicate that it should persist (be combined with subsequent steps) until the next group is traversed (so you can build incrementally on steps/layers without duplicating)


#5

Wow, somehow I never recognised that groups exists.
That’s perfect for my task and simplifies it a lot!
I will definitely change to groups!

Thanks for your hint, that’s really helpful for me!


#6

Haha glad to help. If you get the latest development version there are now “views” too, which might somehow be helpful. You can snapshot the configuration of your layers and give it a name and switch between these named states. Although I still think traversing a tree model might be the way to go


#7

Oh I just remembered how gimp handles animation with layer names. Basically include the word “combine” or “replace” in the layer name to control how the layer persists. I think you’d find that very useful

giftut7