On 7 Sep 2001, Sven Neumann wrote:

> "Stephen J Baker" <[EMAIL PROTECTED]> writes:
> >   * In what form can a plugin access the GIMP image? (eg Are
> >     layers pre-composited?)
> you can only access layers individually through the plug-in API.
> The layer can then be accessed as a drawable, see
> http://sven.gimp.org/1.2/docs/libgimp/libgimp-gimpdrawable.html

That's a shame - but it's not really a killer.  Being able
to view only one layer at a time in the 3D viewer wouldn't
be too bad in this kind of application.  It would be nicer
if we could use the composited version...but this will do
at a pinch.

> >   * Can we really drive the mouse coordinate within the
> >     GIMP core from inside a plugin?
> No. Only tools have access to the mouse and there is no framework
> for pluggable tools (yet).

Could we do something like pretending to be some kind of a custom
tablet driver or something?  How are those interfaced to GIMP?

> >   * If not, how hard would it be to make a plugin do basic
> >     airbrush/clone/pencil/brush functionality from coordinates
> >     stored in shared memory?
> you can call the Gimp's tools through the PDB, see
> http://sven.gimp.org/1.2/docs/libgimp/libgimp-gimptools.html

Excellent. So if we can find out which tool is current, we
can send it "strokes" to make it do the painting.  With this,
we don't need to drive the mouse input.  Good news!

> >   What is your expert take on this?   Is it possible?
> I suggest you take a look at the Texture Paint plug-in which does
> something similar to what you have in mind, see
> http://registry.gimp.org/plugin?id=405

Yes - but it has to do it's rendering within the GIMP environment
where we already have a large and complex tool written that we don't
want to mess with too much.  The deal is that PrettyPoly allows
you to alter the 3D model and how the 2D image is applied to that
model during the painting process.  We can also do things like
rendering the 3D model from multiple viewpoints simultaneously.

How does Texture Paint cope with compositing the GIMP image
layers into a single texture?  I couldn't see anything obvious
in the sources.  Is there GIMP plugin API to do that?

So, this looks to be do-able if we limit ourselves to:

  1) Either compositing the layers together ourselves (hopefully
     using the same rules that GIMP uses) - or more likely - to
     only viewing one layer at a time in the 3D viewer.

  2) Having 3D mouse activity translated into 'stroke' input to
     the standard tools.

Steve Baker                      (817)619-2657 (Vox/Vox-Mail)
L3Com/Link Simulation & Training (817)619-2466 (Fax)
Work: [EMAIL PROTECTED]           http://www.link.com
Home: [EMAIL PROTECTED]       http://web2.airmail.net/sjbaker1

Gimp-developer mailing list

Reply via email to