On 7 September 2013 04:18, Warren Turkal <w...@penguintechs.org> wrote:
> I haven't found any way to make that interface work for what I am doing.
> Basically, I need to be able to return a palette object, but not one in the
> UI yet. That palette object can then be loaded by the existing gimp code
> into a new palette in the UI. Note that this is a slightly simplified
> description as all the current palette "loaders" return a GList* with only
> one entry to a palette object. This code is here.

No, there is no such thing as a Palette object, but not one on the UI yet
in GIMP.
You create  a new palette live, in GIMP.
If you  need it not to appear in the objec, just maintain all palette
data in a data structure
in your own code.
(In python it would be a list of tuples - or a list of dictionaries if you need
better than O(N) access to an entry given its name or it's core value)
And you will need a function call to "commit" your data structure to
a palette in the UI when it is the time -
That would be about five lines of code, including
the function declaration.

If you want to access a non-UI visible GIMP Palette  in several
plug-ins, and want to use GIMP's palette PDB calls for that,
you have to, in the same plug-in: commit your data to a new, temporary,
GIMP Palette, do whatever you want with it (including exporting for an
specific format by calling another plug-in), and remove it from GIMP's
Palette list with pdb.gimp_palette_delete.

  js
 -><-



  js
 -><-
_______________________________________________
gimp-developer-list mailing list
List address:    gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list

Reply via email to