On 27 December 2013 17:16,  <pured...@11h11.com> wrote:
> hi all,
>
> i am controlling mypaint via pure data (pyliblo - osc). would like to make
> some kind of animation (playing back / looping a freehand drawing) <- that
> part is working (recording the tablet information in pure data and sending
> back this data via osc to mypaint / stroke_to).
>
> is it possible to have multiple stroke_to being use at the same time (with
> different brush / color)? maybe there's a way when using different layers?

In theory, from the brush engine perspective, it should "just work".
But I am not sure anyone has actually tested it before :)

You need to instantiate one lib.brush.Brush per brush you want, and
set them up with the different brush settings (for instance using
lib.brush.BrushInfo). This is done in lib/document.py for the one main
brush MyPaint has now.

Once you have that, you should be able to call stroke_to() on each of
them. Using the same surface (the surface is the part of the layer one
paints to) should be fine, but I would first try to call
start/end_atomic() around each stroke_to() call. If that works, try
moving all the stroke_to() calls inside a single begin/end_atomic()
pair.
The current code for this is in lib/layer.py

> btw, i know that mypaint is not made for this kind of hack, but i like the
> render of it and the fact that it's coded in python (so at least i was able
> to add pyliblo to it).
Nah, but libmypaint (with or without GEGL) should be able to do it
easily. Right now its not nice so because the proper backends we have
and renderers for it is a bit of work to set up.
I assume you mainly want to use the canvas and drawing aspects of MyPaint?

-- 
Jon Nordby - www.jonnor.com

_______________________________________________
Mypaint-discuss mailing list
Mypaint-discuss@gna.org
https://mail.gna.org/listinfo/mypaint-discuss

Reply via email to