[Mypaint-discuss] Fwd: My animation app
Used the wrong email address the first time. -- Forwarded message -- From: Jon Nordby nordby@gmail.com Date: 20 January 2013 14:29 Subject: Re: My animation app To: Manuel Quiñones ma...@laptop.org Cc: mypaint-discuss mypaint-discuss@gna.org On 19 January 2013 22:49, Manuel Quiñones ma...@laptop.org wrote: Hey Jon, (sending to mypaint-discuss) Hey Manuel, Yes, lets keep others in the loop too. Thanks for testing and pushing the state of libmypaint further. One thing to note is that the mypaint-gegl.py script does not only use the brushlib, it also uses the MyPaint C++ extensions. So for your application you should try to build the brushlib with introspection (pass enable_introspection=true to scons) and then do from gi.repository import MyPaint, MyPaintGegl instead of the current from lib import mypaintlib, tiledsurface, brush. Good advice, yes that's the way to go for my app. So I installed with introspection but I can't import MyPaint or MyPaintGegl after install. I can see the typelib files in the corresponding path. I might be doing something stupid: Looks like the -$version in .gir and .typelib is mandatory. I think it was optional before, but in any case I've fixed it in master now: http://gitorious.org/mypaint/mypaint/commit/6b374591d203e6cbdecd1dd9fa0f67e2614503b3 Also fixed some other bugs, and added the beginning of an example of how to use the GI bindings from Python, see brushlib/examples/gegl.py As you can see from the comments, things are still a bit rough. Perhaps you know how to address the # TODO: Is there a better way to list all enums with GI? comment? I intend to address the other comments later today. [manuq@manuq-laptop mypaint]$ ls $GI_TYPELIB_PATH Babl-0.1.typelib GeglGtk2-0.1.typelib MyPaintGegl.typelib Gegl-0.2.typelib GeglGtk3-0.1.typelib MyPaint.typelib [manuq@manuq-laptop mypaint]$ python Python 2.7.3 (default, Jul 24 2012, 10:05:38) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2 Type help, copyright, credits or license for more information. from gi.repository import Gegl, GeglGtk3 from gi.repository import MyPaint, MyPaintGegl ERROR:root:Could not find any typelib for MyPaint ERROR:root:Could not find any typelib for MyPaintGegl Traceback (most recent call last): File stdin, line 1, in module ImportError: cannot import name MyPaint My scons commands were: scons enable_introspection=true brushlib_only=true prefix=$PREFIX_GEGL scons prefix=$PREFIX_GEGL install Cheers, -- .. manuq .. -- Jon Nordby - www.jonnor.com ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss
Re: [Mypaint-discuss] First attempt of a libMyPaint demo app...
On 19 January 2013 20:50, Sebastien Leon sl...@pointcarre.com wrote: For now, I had to include these 4 GPL files : brushmodes.cpp/.h and mypaint-tiled-surface.cpp/.h. Note for anyone who would like to include this code into a proprietary project : these 2 files are GPL and as long as you keep them in this mini-project, the whole project is GPL and can not be include into a proprietary project. (I should write some replacement for these files as a next step - unless their license is modified) You are absolutely right. It was my intent that this code also would become ISC as the rest when I moved it to brushlib/ (from lib/). 90%+ of the copyright belongs to Martin and me, smaller contributions have come from 4 others. I have now sent an email to all the copyright-holders of these files to check whether such relicensing is OK. -- Jon Nordby - www.jonnor.com ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss
Re: [Mypaint-discuss] First attempt of a libMyPaint demo app...
Hi Jon, However, the links both return The website you were trying to reach is temporarily unavailable. right now :( Argh ! One of my TikiWiki site had a security breach and had been hacked and Hostmonster simply disabled the whole websites without even informing me ! You can temporarely download the zip file here : http://download.pointcarre.com/mypaint/LibMyPaintDemo.zip Note that this is a very first attempt and I really need a lot of help to provide something useful for anyone who may use libmypaint ! And your advises are very welcome :-) It was my intent that this code also would become ISC [...] I have now sent an email to all the copyright-holders of these files to check whether such relicensing is OK. This is good news because the 15 bpp format seems quite required to render correctly the dab (8 bits format shows a lot of posterization). So it make sense to provide a basic 15 bpp surface + the draw dab algorithm with the library. I'm quite sure I will rewrite it for my own purpose, but for the demo project it is cool ! We'll meet in FOSDEM. As Boudewijn said, a libre graphics meeting would be the place to go (more details later). Regards Seb ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss
[Mypaint-discuss] Fwd: [LGRU] Call for presentations LGM2013: Future Tools
Hi all MyPainters, who is coming to the Libre Graphics Meeting this year? This year it is in early April, 10-13th (not early May like before) in Madrid, and has the theme Future Tools. The call for presentations is open until Feb 15th (see below), and you can register your participation now at http://libregraphicsmeeting.org/2013/registration/ I plan be there for the whole week, so hope to see the rest of you! -- Forwarded message -- From: Femke Snelting snelt...@collectifs.net Date: 19 January 2013 13:14 Subject: [LGRU] Call for presentations LGM2013: Future Tools To: l...@lists.constantvzw.org, Create ML cre...@lists.freedesktop.org *Developers and users meet at the Libre Graphics Meeting in Madrid* Libre Graphics Meeting 2013: Future Tools will take place from Wednesday 10th to Saturday 13th April in Madrid, Spain. The 8th LGM will be held at Medialab Prado's brand new building in the center of Madrid, La Serreria Belga. The event brings together developers and designers from all over the world to work on the many different tools in the Free, Libre and Open Source toolbox. http://libregraphicsmeeting.org *Call for presentations* The Libre Graphics Meeting is looking for in-depth presentations on Libre Graphics technologies, showcases of excellent work made using Libre Graphics tools and new ideas for future approaches, tools and standards. Call for presentations: http://libregraphicsmeeting.org/2013/call-for-presentations Deadline: 15 February 2013 *Sign up for LGM2013* LGM is free to attend and open to all! Registration is not required but it would be nice to know who will be there in Madrid, next spring. Register here: http://libregraphicsmeeting.org/2013/registration Participants so far: http://libregraphicsmeeting.org/2013/participants *Support the Libre Graphics Meeting* Please help us bring developers to Madrid for the Libre Graphics Meeting 2013: Future Tools. We aim to raise 10.000$ to support volunteer developers and presenters that would otherwise be unable to journey to Madrid. Every donation counts! http://pledgie.com/campaigns/19064 ___ LGRU mailing list l...@lists.constantvzw.org https://listes.domainepublic.net/listinfo/lgru -- Jon Nordby - www.jonnor.com ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss
Re: [Mypaint-discuss] Fwd: My animation app
2013/1/20 Jon Nordby jono...@gmail.com: Used the wrong email address the first time. -- Forwarded message -- From: Jon Nordby nordby@gmail.com Date: 20 January 2013 14:29 Subject: Re: My animation app To: Manuel Quiñones ma...@laptop.org Cc: mypaint-discuss mypaint-discuss@gna.org On 19 January 2013 22:49, Manuel Quiñones ma...@laptop.org wrote: Hey Jon, (sending to mypaint-discuss) Hey Manuel, Yes, lets keep others in the loop too. Thanks for testing and pushing the state of libmypaint further. One thing to note is that the mypaint-gegl.py script does not only use the brushlib, it also uses the MyPaint C++ extensions. So for your application you should try to build the brushlib with introspection (pass enable_introspection=true to scons) and then do from gi.repository import MyPaint, MyPaintGegl instead of the current from lib import mypaintlib, tiledsurface, brush. Good advice, yes that's the way to go for my app. So I installed with introspection but I can't import MyPaint or MyPaintGegl after install. I can see the typelib files in the corresponding path. I might be doing something stupid: Looks like the -$version in .gir and .typelib is mandatory. I think it was optional before, but in any case I've fixed it in master now: http://gitorious.org/mypaint/mypaint/commit/6b374591d203e6cbdecd1dd9fa0f67e2614503b3 Also fixed some other bugs, and added the beginning of an example of how to use the GI bindings from Python, see brushlib/examples/gegl.py Excellent Jon, I got it working now, both imports work. And the example is appreciated. As you can see from the comments, things are still a bit rough. Perhaps you know how to address the # TODO: Is there a better way to list all enums with GI? comment? Hmm interesting question. I digged into pygobject but couldn't find a decent way to list the anums. I intend to address the other comments later today. Great! In partular instancing a MyPaintGegl.TiledSurface will allow to do a simple test app like mypaint-gegl.py but with introspection. Here it throws MemoryError, I think you had a different error. from gi.repository import MyPaintGegl surface = MyPaintGegl.TiledSurface() Traceback (most recent call last): File stdin, line 1, in module MemoryError Thanks for your work, [manuq@manuq-laptop mypaint]$ ls $GI_TYPELIB_PATH Babl-0.1.typelib GeglGtk2-0.1.typelib MyPaintGegl.typelib Gegl-0.2.typelib GeglGtk3-0.1.typelib MyPaint.typelib [manuq@manuq-laptop mypaint]$ python Python 2.7.3 (default, Jul 24 2012, 10:05:38) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2 Type help, copyright, credits or license for more information. from gi.repository import Gegl, GeglGtk3 from gi.repository import MyPaint, MyPaintGegl ERROR:root:Could not find any typelib for MyPaint ERROR:root:Could not find any typelib for MyPaintGegl Traceback (most recent call last): File stdin, line 1, in module ImportError: cannot import name MyPaint My scons commands were: scons enable_introspection=true brushlib_only=true prefix=$PREFIX_GEGL scons prefix=$PREFIX_GEGL install Cheers, -- .. manuq .. -- Jon Nordby - www.jonnor.com ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss -- .. manuq .. ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss
Re: [Mypaint-discuss] Fwd: [LGRU] Call for presentations LGM2013: Future Tools
2013/1/20 Jon Nordby jono...@gmail.com: Hi all MyPainters, who is coming to the Libre Graphics Meeting this year? I was hoping to go to Madrid, but I'm afraid I will not be able to go this year :( Hope to see you guys in the next opportunity. -- .. manuq .. ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss
Re: [Mypaint-discuss] First attempt of a libMyPaint demo app...
On 20 January 2013 19:52, Sebastien Leon sl...@pointcarre.com wrote: You can temporarely download the zip file here : http://download.pointcarre.com/mypaint/LibMyPaintDemo.zip Note that this is a very first attempt and I really need a lot of help to provide something useful for anyone who may use libmypaint ! And your advises are very welcome :-) Thanks. Looking though it, it seems that you based this code on an older version of libmypaint, before MyPaint 1.1? The API for fetch/update tile is a bit different now, in order to allow multithreading without locking. Also, you seem to have renamed every .c file to .cpp? Why? Some hints for the issues you have listed in the README and in the code. In order for caching and deferred processing to work correctly, you must call mypaint_surface_begin_atomic() before doing mypaint_brush_stroke_to(), and mypaint_surface_end_atomic() when done. With libmypaint 1.1 and git, nothing will happen if you don't as everything is done on end_atomic() To set color, convert RGB to HSV and do (values are float): mypaint_brush_set_base_value(brush, MYPAINT_BRUSH_SETTING_COLOR_H, h); mypaint_brush_set_base_value(brush, MYPAINT_BRUSH_SETTING_COLOR_S, s); mypaint_brush_set_base_value(brush, MYPAINT_BRUSH_SETTING_COLOR_V, v); All other brush settings, from dab size, hardness, opacity to speed filters and alpha-locking are manipulated the same way. Another thing is that the delta-time calculation should normally be done from the input events you get from your windowing system, to not be dependent on CPU load. But it seems Qt does not expose that!? Also, I _believe_ that the correct thing to do is to new_stroke() on button/tablet down to start a stroke, then reset() on button/tablet up to finish it. Martin, does that sound right? If so, perhaps we should rename reset() to end_stroke()? It was my intent that this code also would become ISC [...] I have now sent an email to all the copyright-holders of these files to check whether such relicensing is OK. This is good news because the 15 bpp format seems quite required to render correctly the dab (8 bits format shows a lot of posterization). So it make sense to provide a basic 15 bpp surface + the draw dab algorithm with the library. I'm quite sure I will rewrite it for my own purpose, but for the demo project it is cool ! Yes, at least one needs more than 8bpc. Floating point would also do fine of course. All in all, the renderer we have in MyPaint is pretty good and I think it would be great if others could just use that instead of having to implement their own. -- Jon Nordby - www.jonnor.com ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss
Re: [Mypaint-discuss] First attempt of a libMyPaint demo app...
Hi Jon, Looking though it, it seems that you based this code on an older version of libmypaint, before MyPaint 1.1? Checked the tar.gz from which I extracted the files and it seems it is Version 1.0.0. I remember I started to look at this code some time ago, unfortunately I had no time work on it seriously... And I forget to update to the latest version when I started again to work on it... Also, you seem to have renamed every .c file to .cpp? Why? Oops... I did that month ago as a turn around against some no-brain MSVC issue and forget to remove this file extension modification... As you suggest, I'll get the latest version (keeping the correct extensions) and will use the correct API (begin/end atomic). Thanks for the info about the brush color and other settings ! Looks obvious now that you say it... Another thing is that the delta-time calculation should normally be done from the input events you get from your windowing system, to not be dependent on CPU load. But it seems Qt does not expose that!? Digging into QInputEvent and QEvent and did not find any time information. However, I think I can find some turn-around (no fully efficient but should be ok) From the mouse/tablet events, I do not raise any synchronous repaint event. Update() send an asynchronous event which is processed when idle (it could be an issue too as the user could have some step by step renderer. I'll make some tests and let you know) So, it may not be as bad as it looks... draw_dab could even being done by another thread/CPU. In the demo app, I will not try any advanced technics but in my application, I already have a drawing mode which is fast (and dirty) and a mouse released event which is drawing everything very accurately (in a second time). I could eventually hack Qt or ask for such feature in main tree. (but I doubt that Digia or qt-project will want to modifiy QEvent prototype) Also, I _believe_ that the correct thing to do is to new_stroke() on button/tablet down to start a stroke, then reset() on button/tablet up to finish it. Ok. Sounds logical as I had some weird behavior with my code. Something was missing... I should update to the latest version and fix all these issues and come back to you in few hours... Thanks again for your feed-back your help. Seb ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss