Re: [Mypaint-discuss] Fwd: My animation app
Hey Jon, sorry for the long delay. Just wanted to say, your progress on this topic is amazing. For the example, I'm not sure why in my system I get crashes at the moment I start a stroke, when I click the canvas. Sometimes it gives: eEeek! 4 GeglBuffers leaked And most of the times it gives: *** glibc detected *** python: free(): invalid pointer: 0x00fab518 *** and a long backtrace. By the way, I will start mocking my app using just GEGL from Python via introspection. So I will be joining GEGL mailing list. Thanks, 2013/1/23 Jon Nordby jono...@gmail.com: On 20 January 2013 20:17, Manuel Quiñones ma...@laptop.org wrote: 2013/1/20 Jon Nordby jono...@gmail.com: 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. As discussed on IRC, this was fixed in master on Sunday evening. Some API changes were needed to make things work, notably making use of refcounting on MyPaintSurface and MyPaintBrush, so that they can be wrapped without issues with GBoxed types. aalmost there to a 100 line application that can paint with MyPaint brushes on a GEGL backend, including rendering to screen: http://gitorious.org/~jonnor/mypaint/jonnors-clone/commit/402366d9b3e7ad708351c193573a8f4d2850b95b -- Jon Nordby - www.jonnor.com -- .. manuq .. ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss
Re: [Mypaint-discuss] Fwd: My animation app
On 20 January 2013 20:17, Manuel Quiñones ma...@laptop.org wrote: 2013/1/20 Jon Nordby jono...@gmail.com: 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. As discussed on IRC, this was fixed in master on Sunday evening. Some API changes were needed to make things work, notably making use of refcounting on MyPaintSurface and MyPaintBrush, so that they can be wrapped without issues with GBoxed types. aalmost there to a 100 line application that can paint with MyPaint brushes on a GEGL backend, including rendering to screen: http://gitorious.org/~jonnor/mypaint/jonnors-clone/commit/402366d9b3e7ad708351c193573a8f4d2850b95b -- Jon Nordby - www.jonnor.com ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss
[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] 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