Re: [Gimp-user] Automated sequence of actions with keyboard shortcuts? [SOLVED]
Hi, On Wed, 2007-02-28 at 03:31 -0500, [EMAIL PROTECTED] wrote: > Quoting Sven Neumann <[EMAIL PROTECTED]>: > > > You can write scripts for 2.2 now and continue to use them with future > > GIMP versions. The plug-in and scripting API is backwards compatible. I > > wonder why the example script even goes through the hassle of trying to > > deal with versions. > > A valid point. I just dislike deprecation warnings popping up and I > was rushing things a bit. Just start gimp-2.3 with the --pdb-compat-mode=on command-line option then. The default for the unstable releases is to warn about deprecated functions being used. But this will of course change for stable releases and there will by default not be such warnings with gimp-2.4. Sven ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Automated sequence of actions with keyboard shortcuts? [SOLVED]
Quoting Sven Neumann <[EMAIL PROTECTED]>: > You can write scripts for 2.2 now and continue to use them with future > GIMP versions. The plug-in and scripting API is backwards compatible. I > wonder why the example script even goes through the hassle of trying to > deal with versions. A valid point. I just dislike deprecation warnings popping up and I was rushing things a bit. Quoting David Gowers <[EMAIL PROTECTED]>: > The script as defined above produces an antialiased fill, which is naturally > the opposite of aliased (aliasing is stairstepping, and antialiasing > counteracts it.). If an aliased (ie. hard-edged) rendering were preferable, > (gimp-selection-sharpen image) would be needed before bucket filling. 'gimp-selection-sharpen' is unnecessary because anti-aliasing was disabled (the argument set to FALSE) in the 'gimp-path-to-selection' call. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Automated sequence of actions with keyboard shortcuts? [SOLVED]
Hi, On Wed, 2007-02-28 at 08:02 +0900, Dave M G wrote: > Once version 2.4 is released, and if one were to write the code only to > support 2.4 and later, and not worry about earlier versions, would that > also simplify it down? I'm thinking if that were the case, then I might > wait until 2.4 is out and then get more into scripting. After all, from > what I've read on this mailing list, a 2.4 release seems just a little > ways away. You can write scripts for 2.2 now and continue to use them with future GIMP versions. The plug-in and scripting API is backwards compatible. I wonder why the example script even goes through the hassle of trying to deal with versions. Sven ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Automated sequence of actions with keyboard shortcuts? [SOLVED]
Hi, On 2/28/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: (define (script-fu-path-fill-aliased image layer) (let* ((path (car (gimp-path-get-current image (gimp-image-undo-group-start image) (gimp-path-to-selection image path CHANNEL-OP-REPLACE FALSE FALSE 0 0) (gimp-edit-bucket-fill layer FG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0) (gimp-selection-none image) (gimp-path-delete image path) (gimp-displays-flush) (gimp-image-undo-group-end image) ) ) The script as defined above produces an antialiased fill, which is naturally the opposite of aliased (aliasing is stairstepping, and antialiasing counteracts it.). If an aliased (ie. hard-edged) rendering were preferable, (gimp-selection-sharpen image) would be needed before bucket filling. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Automated sequence of actions with keyboard shortcuts? [SOLVED]
Saul, Thank you for continuing to help and explain. > The script appears complicated because it handles differences in the > PDB interface between version 2.2 and the development version Ah, I see. I had to look up "PDB Interface" to know what you're talking about, but now I get it. Once version 2.4 is released, and if one were to write the code only to support 2.4 and later, and not worry about earlier versions, would that also simplify it down? I'm thinking if that were the case, then I might wait until 2.4 is out and then get more into scripting. After all, from what I've read on this mailing list, a 2.4 release seems just a little ways away. > (perhaps my comments obfuscated the code as well). No, comments are good! The more comments the better, I think. > Personally, I would recommend removing the line that deletes the path > -- paths take up very little memory and you may wish to go back and > edit them later. For what I'm doing, especially considering the volume of coloured areas I'm working with, I'm unlikely to every really need a path a second time. But I'm developing a little confidence with the scripts, so that if I change my mind about that, I think I can easily remove that part of the script and have a second version that leaves the path there. -- Dave M G Ubuntu 6.10 Edgy Eft Kernel 2.6.17.7 Pentium D Dual Core Processor PHP 5, MySQL 5, Apache 2 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Automated sequence of actions with keyboard shortcuts? [SOLVED]
Quoting Dave M G <[EMAIL PROTECTED]>: > The script looks quite complicated to me, but I will endeavor to use it > as a model for building some other action sequences similar to this. > Hopefully by changing just one or two things at a time I can get a feel > for this and create more interesting scripts down the road. The script appears complicated because it handles differences in the PDB interface between version 2.2 and the development version (perhaps my comments obfuscated the code as well). If the script only supported versions <= 2.2, it would be about as simple as a script can be -- perhaps showing such code would make it more clear (I left out the PDB registration function): (define (script-fu-path-fill-aliased image layer) (let* ((path (car (gimp-path-get-current image (gimp-image-undo-group-start image) (gimp-path-to-selection image path CHANNEL-OP-REPLACE FALSE FALSE 0 0) (gimp-edit-bucket-fill layer FG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0) (gimp-selection-none image) (gimp-path-delete image path) (gimp-displays-flush) (gimp-image-undo-group-end image) ) ) Personally, I would recommend removing the line that deletes the path -- paths take up very little memory and you may wish to go back and edit them later. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Automated sequence of actions with keyboard shortcuts? [SOLVED]
Saul, Joao, Thank you for replying. [EMAIL PROTECTED] wrote: > I had a few minutes free so I whipped up a script-fu which I think > will do the task you described. ... > The command is not assigned to a keystroke but you can do so from the > "File->Preferences->Interface->Configure keyboard shortcuts->Plugins" Wow! Thank you so much! I've downloaded, installed, and assigned a keyboard shortcut to the script, and it works exactly as I had hoped. You've saved me a lot of work, so I really appreciate your effort. The script looks quite complicated to me, but I will endeavor to use it as a model for building some other action sequences similar to this. Hopefully by changing just one or two things at a time I can get a feel for this and create more interesting scripts down the road. Thank you Saul, and the GIMP users list, for all your support. -- Dave M G Ubuntu 6.10 Edgy Eft Kernel 2.6.17.7 Pentium D Dual Core Processor PHP 5, MySQL 5, Apache 2 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user