On Tue, Feb 22, 2011 at 04:50:14PM -0500, Kevin Cozens wrote:
> Nelson A. de Oliveira wrote:
> > While running the camouflage pattern plugin I saw an error:
> I usually do much of the work to update Script-Fu scripts to the latest API 
> as I have a Perl based script that automates the update procedure. This 
> script uses information generated by running other Perl based scripts 
> against a PDB dump from GIMP. I am in the process of updating my update 
> script but its a big job this time. There are 107 changes to the PDB since 
> the release of the 2.6 version of GIMP and three different types of changes 
> that have to be handled across 100 scripts.
Using Perl to fix Script-fu -- this kind of thing always makes me laugh a

> The first change is the common one where deprecated procedures just need 
> minor updates (ie. changing to the procedure name to the replacement 
> procedure). The other two changes involve PDB procedures with some 
> parameters now set via context functions and the introduction of the item 
> API. These last two changes will require more work to handle in an automated 
> manner.
Nelson's patch fixes a lot of these, I was surprised to see so many there
compared to what had been attached to the email.

https://bugzilla.gnome.org/show_bug.cgi?id=642938 has patches for at least one
of the scripts that are in Nelson's big patch.  These script-fu look for 
brushes that GIMP no longer installs.  Putting the brushes back would be a
solution for the breakage.  Removing the scripts would also be a solution. I
rewrote the scripts to make a vector brush and dispose of it which is (in my
opinion) more of a gimp-2ish solution.

I am curious to know what you had been thinking about as a solution for this
script problem.

> Until recently some deprecated procedures referred to a replacement 
> procedure that did not exist. This has been fixed so the PDB is complete and 
> stable enough for now to begin the work to update my update script. I will 
> be reviewing the updates originally made to the scripts for 2.7 API as I 
> have seen some changes to the called procedures are not correct as of the 
> current API.
commit e062acbc642cf0cfa601595ddb0524be11354dd9 from last October broke 
several of the s-fu, and i cannot remember if this was before the deprecated
procedures were removed or not.  I am assuming that the commiter was not your
perl script, but they have been broken since then.

> Until now, updating the scripts can usually be done in about 15 minutes 
> starting from the running of GIMP to get a current dump of the PDB (if there 
> are no other unusual changes). I will be doing the work for 2.7/2.8 in two 
> stages with the simple changes as the first stage and the changes involving 
> context and item API as the second stage. I'm currently working on two other 
> projects so I'm doing this as time permits.

Actually, I was told that one of the reasons for these scripts was to see how
to accomplish things via scripting.  Manually making these patches has done
exactly this for me and I regret not looking at them sooner.

When I look at the Changelogs, I thought that you had made the changes to 
these scripts manually and felt kind of pleasently humbled.  I will feel 
differently now.

Nelsons patch seems to have been script-matically made, several of the patched
scripts will still produce deprecated errors.


Gimp-developer mailing list

Reply via email to