Re: calling script-fu from perl script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 10, 2000 at 01:23:31PM -0500, "Michael J. Hammel" <mjhammel@xxxxxxxxxxxxxxxxx> wrote:

Hmm, a serialization issue is unlikely, since all the other plug-ins seem
to work, and script-fu never could be called reliably. If this, however,
is indeed the case than this change is probably quite new (maybe somebody
hacked locking lately?)

> > drawable instead of both image and drawable) is this:
> 
> Is there a way to pass in the image id?

Just pass it in at the usual position.

> I tried, but I get error messages

Did you pass in a valid image, or did you try to pass in a number? The latter
might not work reliably. You can also try to use the all-explicit syntax,
i.e.

(RUN_INTERACTIVE, $image, $drawable, ...

> when I try to pass the image id as the first parameter.  Do you pass the
> image id and drawable id's as a list?

No, you pass them "as usual".

> 
> > i.e. it calls gimp_drawable_image_id (or gimp_layer_get_image_id
> > etc..) to get the image, which in turn calls the the pdb function
> > gimp_drawable_image without any caches. This means that, temporarily, gimp
> > returns "-1" as the image id and later the correct one.
> 
> Ick.  If this is true then there is a timing issue here where plug-ins
> can't call other plug-ins. 

you could check this hypothesis by doing something like this:

for (0..29) {
   print "IMAGE ID: ", ${$drawable->image}, "\n";
   select undef, undef, undef, 0.1;
}

this (untested) snippet prints out the image id of your drawable ten times
a second. Just insert it after the call to drop_shadow (i.e. where you
formerly added the delay).

When the image id changes from -1 to something else we have found the
problem.

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg@xxxxxxxxxxxxx |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux