hi Nicholas

I think it would be desireable (and not hard) to get rid of the glib
dependency.  We can use C99 bool instead of gboolean (unless someone thinks
it's too early to use a 1999 Standard already in the year 2012 ;-)

The reason for using glib's random generator was because it can save its
state.  Is there a good replacement in the standard library?  We probably
could use random_r() or rand_r().  Are those portable enough?

Regarding json brush settings, personally I would prefer not to parse this
from C since the whole file and string handling (including unicode file
names etc) is much easier from a high-level language like Python.  Also,
some of the stuff that we save into the .myb files (like restore_color and
parent_brush_name) are actually handled on a higher level than brushlib.

The disadvantage of that route is of course that brushlib is less
self-contained.

Regards
Martin

On Tue, May 22, 2012 at 09:41:10PM -0400, Nicholas Bishop wrote:
> Hi,
> 
> I'm one of the maintainers of the sculpt/paint tools in Blender
> (www.blender.org), and I'm looking into using the MyPaint brushlib. I
> see that the library is transitioning from C++ to C, which is good for
> us as Blender is mostly C.
> 
> I have a few questions on the future of the brushlib:
> 
> * How soon are the various goals mentioned in its TODO file expected?
> In particular, transitioning to the JSON file format and accompanying
> load/save code?
> 
> * Will brushlib keep its dependency on glib? The use of glib seems to
> have spread a bit, it's not just using it for g_rand but also types
> and macros. For Blender we probably don't want to depend on glib, but
> for now it shouldn't be too hard to patch it locally to work around
> that. If brushlib starts using glib more extensively that could be a
> problem though. Is there any interest in using regular C types rather
> than glib's (e.g. replacing gboolean with int), or wrapping the
> glib-specific parts in '#ifdef WITH_GLIB' or equivalent?
> 
> I'd be happy to contribute patches to brushlib for TODO items and
> making integration with Blender easier; would be good to hear more on
> what existing plans are.
> 
> Thanks,
> -Nicholas
> 
> _______________________________________________
> Mypaint-discuss mailing list
> [email protected]
> https://mail.gna.org/listinfo/mypaint-discuss
> 

-- 
Martin Renold

_______________________________________________
Mypaint-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-discuss

Reply via email to