On Wed, 21 Jun 2006 22:54:32 +0200, Sven Neumann <[EMAIL PROTECTED]> wrote:
> On Wed, 2006-06-21 at 21:15 +0200, Raphaël Quinet wrote:
> > [...]  After moving these functions in the new
> > libgimpmetadata library, they would still be exported to the PDB but
> > probably renamed gimp-metadata-* instead of plug-in-metadata-*.
> I don't really understand that part yet. If the code is in a library
> that plug-ins can link to, why are the functions exported to the PDB and
> how exactly does this happen?

The file plug-ins would not use these functions via the PDB because they
could use the library directly.  However, it is still useful to have
these functions exported to the PDB so that they can be used by scripts.
For example, if you want to have a script that automatically attaches a
Creative Commons license to a file, it would only have to call something
like this:
  gimp-metadata-set-scalar (image, "xmpRights", "marked", "true")
  gimp-metadata-set-scalar (image, "cc", "license", 

That covers the "why".  Regarding the "how", it depends...  My long-term
goal is to move the metadata viewer/editor into the core (like other info
dialogs and so on) because it would be the only way to ensure that it
reflects the current state of the metadata while the image is being edited.
This would solve some of the annoying concurrency problems: if you open the
metadata editor (currently a plug-in), and save the image while the
editor is open, then some changes to the metadata are lost because the
parasite is modified by the file plug-in but the editor does not know it.
I think that I mentioned this before or during the last GIMPCon.

So if/when the metadata viewer/editor is in the core, then it makes sense
for the core to export some of these functions to the PDB.  But I am not
planning on migrating the editor to the core right now.  In the meantime,
it may be better for the editor (the GUI part) to remain as a plug-in and
then it would make sense for it to export these functions to the PDB.  But
even if these functions are temporarily exported by a plug-in, I think that
it would be better to name them "gimp-metadata-*" in order to reflect the
intent to move them into the core later, and to avoid breaking scripts that
could start using them in the meantime.

Gimp-developer mailing list

Reply via email to