Re: [Gimp-user] script-fu: saving dialog choices
Hi Saul, Many thanks for instant help. I'm trying to figure ut if there's any way that choices made by user in dialog widgets can be remembered and used as values of those widgets next time dialog runs. That is precisely how script dialogs currently behave; the last used values are presented. These last values will be reset to their original default values if 1) Script-fu is refreshed (Filters-Script-fu-Refresh Scripts) or 2) GIMP is restarted. Sorry, I mis-stated my problem. I'd like dialog to come up with same widget values next time GIMP is started up. ...(snip)... Tick quoting does not result in evaluation of the list elements. Use 'list' so that WRF_BIT_WIDTH gets evaluated and replaced by its numeric value: Thanks, I think it I read that bit in the Scheme manual and forgot it. ...(snip)... If, however, the issue you are attempting to address is having the last values retained across sessions (or survive a Script Refresh), this would be possible by storing your script's last values in the gimpdir/parasiterc file: (define (script-fu-woodrat image drawable bit-width) ; Substitute function owing to buggy parasite-attach behavior (define (fu-parasite-attach parasite) (gimp-parasite-attach parasite) (while (not (string=? (caddr parasite) (caddar (gimp-parasite-find (car parasite) (gimp-parasite-attach parasite))) ; Save the user-specified bit-width to an application parasite (fu-parasite-attach (list WRF_BIT_WIDTH 1 (number-string bit- width))) ... ) (script-fu-register script-fu-woodrat : : : SF-IMAGE ... SF-DRAWABLE ... SF-VALUE Bit width (catch 17 ; fallback value if first-time run (string-number (caddar (gimp-parasite-find WRF_BIT_WIDTH))) ) Note that 'gimp-parasite-find' is only executed once: when GIMP is initially loaded (or if scripts are refreshed). Even though the parasite is saved every time the script is executed, it is actually GIMP's internally stored last value (not the parasite) that is used in determining the value for the 'bit-width' parameter. The only reason you'd want to take these steps is to support last values across different sessions. The behavior you desired (as expressed in the first paragraph of your post) is already supported by GIMP. Sorry, mis-stated by requirement. parasites are just what I need. Can't find much about them. (list WRF_BIT_WIDTH 1 (number-string bit-width))) First list member: parasite ID string. What's the second list member? Flags, I understand from one search result I found. Used? Third list member: parasite value (must always be a string). So an RGB colour value would have to be stringified. unstrbreakup maybe? Generally: do all the gimp-*-parasite-attach methods suffer from same bug, so should be reapplied til they work? Yrs, Alan Public speaking is very easy. -- Vice President Dan Quayle to reporters in 10/88 = + = ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] dependant scm files and script-fu load
I have several scm files; they all live in a single folder (which is on GIMP search path for scripts). I have common code for three of the scripts which all goes into a fourth. A fifth has defines which user of scripts may wsh to alter; the fourth script depends on it. If I just leave nature -- or GIMP to take it's course, the scripts don't load when scripts come up, unless I arrange for the most- depended on script (the fifth) to have a name prceeding all others in alphabetical sort order, the fourth the next in order. If I refresh scripts, name order doesn't seem to matter, all works fine. Okay, so to avoid problem I'd like to explicitly load one file from another. But (load script) seems to require an absolute path. I don't want to specify absolute path because other users of scripts (which are mean to be distributed) could put scripts anywhere. Is there a way to refer to something like folder in which curent script resides or user GIMP configuration folder (e.g. on my machine Docs and Settings\UserName\.gimp-2.6)? Yrs, Alan The more you complain, the longer God lets you live. = + = ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Fwd: script-fu: saving dialog choices
Generally: do all the gimp-*-parasite-attach methods suffer from same bug, so should be reapplied til they work? Yep. use the https://bugzilla.gnome.org/show_bug.cgi?id=572865 https://bugzilla.gnome.org/show_bug.cgi?id=624555 https://bugzilla.gnome.org/show_bug.cgi?id=624567 (last 2 marked as duplicates) I beleive there is a proposed patch though. Instead of parasites consider using gimp_gimprc_set() and gimp_gimprc_query() which don't seem to have this issue. -Rob A ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] dependant scm files and script-fu load
Is there a way to refer to something like folder in which curent script resides or user GIMP configuration folder (e.g. on my machine Docs and Settings\UserName\.gimp-2.6)? gimp-directory gets you to there. Check out this page: http://www.ve3syb.ca/wiki/doku.php?id=software:sf:writing -Rob A ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] curving text (text to path?)
Hi folks; Im a new user here so be gentle. A little background: I work for a small engineering firm that designs racing transmission parts. Im comfortable using CAD and other engineering software, but this 20min project has taken up half my day. I need to create a logo, using our existing one. All I wanted to do was add a curved text portion above and below our original logo. It needs to have the same curve top and bottom. Ive played with the text-to-path and I cant get a good looking linear curve over the top of our logo. And, even if I did; I dont know how to match that curve on the bottom rocker so they look similar. I tried the circular text logo template, but I need the text to read RTL on the top curve and the bottom. Someone told me there was an ARC plug-in for CD labels, can I use this on my windows based version of GIMP2? Thanks for your time; Nate -- Nathan H. (via www.gimpusers.com) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] curving text (text to path?)
Hi folks; Im a new user here so be gentle. A little background: I work for a small engineering firm that designs racing transmission parts. Im comfortable using CAD and other engineering software, but this 20min project has taken up half my day. Not to chase away a gimp user, but with your cad background (and for logo work in general) you may be better off using a vector based application like Inkscape. -Rob A ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] curving text (text to path?)
Quoting Nathan H. for...@gimpusers.com: I work for a small engineering firm that designs racing transmission parts. Im comfortable using CAD and other engineering software, but this 20min project has taken up half my day. I need to create a logo, using our existing one. All I wanted to do was add a curved text portion above and below our original logo. It needs to have the same curve top and bottom. http://chiselapp.com/user/saulgoode/repository/script-fu/wiki?name=sg-warp-text ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Removing broken scripts.
On Thu, 2010-09-09 at 18:02 +0200, Cecil C. wrote: I use Gimp under Ubuntu 10.04. My question is fairly simple. I have been using Gimp since 2.0, and have copied scripts over from release to release. Usually, some of the copied scripts are broken when a new release is available, such as from 2.4 to 2.6. To date, I have not made the effort to remove the broken scripts. When a script is broken, I find out by running the script and getting an error message, such as Error: set!: unbound variable: screen-layer. I know how I invoked the script from the menu, so I can edit all the scripts in my directory to see where they put the script in the menu structure and the name they used. Often, I can narrow the number of scripts I have to edit to find the correct one by using the script name as a starting point. However, there are a significant number of scripts that have a different file name than that used in the menu. Needless to say, this is a tedious and slow process. Is there an easier way to identify a broken script file other than the process I have outlined above? Probably the easiest way to find a script that contains a certain string (as found in the error-message) is to use the grep utility. Try 'man grep'. Sven ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] script-fu: saving dialog choices
Quoting Alan Campbell gimp-u...@alancampbelllists.ukfsn.org: parasites are just what I need. Can't find much about them. (list WRF_BIT_WIDTH 1 (number-string bit-width))) First list member: parasite ID string. What's the second list member? Flags, I understand from one search result I found. Used? To my knowledge, the FLAGS parameter controls 1) whether the parasite is persistent across sessions, and 2) whether adding the parasite is an UNDOable operation. 1) is controlled by the least significant bit of FLAGS, while 2) is controlled by the second bit. This results in four possible settings: 0 - Not persistent and not UNDOable 1 - Persistent and not UNDOable 2 - Not persistent and UNDOable 3 - Persistent and UNDOable Third list member: parasite value (must always be a string). So an RGB colour value would have to be stringified. unstrbreakup maybe? That would work. (set! color (car (gimp-context-get-foreground))) ; as an example (set! str (unbreakupstr (map number-string color) )) : : (set! color (map string-number (strbreakup str ))) Generally: do all the gimp-*-parasite-attach methods suffer from same bug, so should be reapplied til they work? I believe so. Yes. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user