GIMP Chat
http://gimpchat.com/

GIMP10 Constantize Plug-in
http://gimpchat.com/viewtopic.php?f=9&t=16827
Page 1 of 1

Author:  trandoductin [ Fri Sep 07, 2018 12:09 am ]
Post subject:  GIMP10 Constantize Plug-in

Do you have an old .scm or .py file that no longer runs in GIMP 2.10.6.

Over 90% of the time I found it required no logical change, just CONSTANT NAMES replaced so that GIMP 2.10 will recognize them and run flawlessly.

This plug in is to allow any user to replace their old files with new GIMP 2.10.6 CONSTANTS so that it would run again.

More details here-> https://www.gimplearn.net/viewtopic.php?f=3&t=1714

Author:  lylejk [ Fri Sep 07, 2018 12:30 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Much needed, Tran. About to start my 40 hour work weekend, but I might try using this for the few problematic Script-fus that I have that now won't properly work (or gives errors) in 2.10x. You all have a great weekend. :)

Author:  trandoductin [ Fri Sep 07, 2018 12:44 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Thanks lylejk... hopefullly it's no logical change needed and will magically work for you.

Author:  Rod [ Fri Sep 07, 2018 5:28 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Thanks Tran. All my scripts (the ones i wrote included) seem to work so far in 2.10. Only problem i am having is with PSPI to run 8BF's.

Author:  trandoductin [ Fri Sep 07, 2018 7:33 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Rod, do you mean they already work or did this plug-in help make it work?
I don't know PSPI 8BF's

Author:  Nidhogg [ Fri Sep 07, 2018 9:31 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

That's cool.
I used Notepad++/Geany (replace all) to fix scripts but always miss something.
Still getting errors but this is good help. Thank You :bigthup

Author:  trandoductin [ Fri Sep 07, 2018 9:45 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Notepad++ is awesome I miss it...It used to work for me under Wine, but since I upgrade Ubuntu it seems my Wine is a mess and Notepad doesn't start.

UPDATE: I looked a bit into and got notepad++ now..yeh! Love notepad++

Author:  trandoductin [ Fri Sep 07, 2018 10:05 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Nidhogg wrote:
That's cool.
I used Notepad++/Geany (replace all) to fix scripts but always miss something.
Still getting errors but this is good help. Thank You :bigthup


Still getting errors? are they CONSTANT name errors, I'd like to know so I can add them constants if needed.

Author:  MareroQ [ Sat Sep 08, 2018 2:42 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Hi TIN.
I had to test it.
This is very convenient - thanks Tin for sharing.
Thank you also for Auto Complete Constants / pdb. * Functions in NotePad ++ for Coders
I used LayerFX for 2.8 (Python-Fu) for the test:
https://web.archive.org/web/20171124170423/http://gimpscripts.com:80/2011/10/gimp-layer-effects#wpfb-file-35
In my system (Win Vista32bit, Gimp 2.10.5) there was a small problem with the layer mode:
      "Hue",           HUE_MODE,            -> GIMP10 constantize -> LAYER_MODE_HUE            pdb:LAYER_MODE_HSV_HUE_LEGACY
      "Saturation",    SATURATION_MODE,     -> GIMP10 constantize -> LAYER_MODE_SATURATION     pdb:LAYER_MODE_HSV_SATURATION_LEGACY
      "Color",         COLOR_MODE,          -> GIMP10 constantize -> LAYER_MODE_COLOR          pdb:LAYER_MODE_HSL_COLOR_LEGACY
      "Value",         VALUE_MODE           -> GIMP10 constantize -> LAYER_MODE_VALUE          pdb:LAYER_MODE_HSV_VALUE_LEGACY


LayerFX-2.10.py it certainly needs improvement - it does not work "Reapply Effects" (I do not understand how to fix it - so if someone does not fix it, you can definitely remove this piece of code) , but for the brave testers the file is attached.

Attachment removed - attached layerfx.py plugin contained a bug as indicated in thread #18

Author:  Nidhogg [ Sat Sep 08, 2018 4:16 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

trandoductin wrote:
Nidhogg wrote:
That's cool.
I used Notepad++/Geany (replace all) to fix scripts but always miss something.
Still getting errors but this is good help. Thank You :bigthup


Still getting errors? are they CONSTANT name errors, I'd like to know so I can add them constants if needed.


No...CUSTOM can't be CONSTANT? :rofl APPLY & VALUE-LUT also gave me the headache.
But I'm learning, got gc-shadow script fixed yay!
I'm just wondering if it would be better to get myself familiar with .py if .scm is getting deprecated.

Author:  trandoductin [ Sat Sep 08, 2018 9:28 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

I highly recommend getting familiar with .py.
If you don't know anything you can just look it up and all over the internet. .scm was so hard to find documentation on I find.

Author:  Rod [ Wed Sep 26, 2018 5:50 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

trandoductin wrote:
Rod, do you mean they already work or did this plug-in help make it work?
I don't know PSPI 8BF's

PSPI is a plugin to run adobe plugins in GIMP.

I didn't use your script (plugin) I don't seem to need it.

Author:  ofnuts [ Wed Sep 26, 2018 9:46 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Nidhogg wrote:
I'm just wondering if it would be better to get myself familiar with .py if .scm is getting deprecated.


Script-fu is unfortunately there to stay, but this isn't a good reason to keep using it. Python is easier to learn (it is taught as a beginner's language in many universities), will let you do more things with Gimp (the Python API is a superset of the script-fu one), and can be used for other things outside of Gimp (for instance, it is also the script language for Inkscape, Scribus and PaintShop Pro, to mention only other grahics editors).

In recent statistics(*) Python is the 4th most popular programming language and given its growth it can become the topmost one.

Image


(*) You will also notice that in all these statistics, Lisp/Scheme/Script-fu is not even on the radar screen.

Author:  trandoductin [ Fri Sep 28, 2018 9:10 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

This is an insane graph for python.

Author:  Nidhogg [ Sun Dec 16, 2018 3:45 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Yeah I didn't have any experience/knowledge about python. All I did was some super basic...basic with C64 haha.
But, finally the code bug bit and I decided to grab the bull by the horns and begun to learn. There's been lot of talk about coding and how useful it can be, even if one wouldn't transmogrify into a total nerd.
Was bit worried about math...never found it interesting in school for some reason, which is strange because I really liked chemistry and physics. Plus I don't have higher level education. Been going through the beginner lessons they have online versions of at python.org, and so far going good.

Author:  rich2005 [ Sun Dec 16, 2018 5:34 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

ofnuts wrote:

Script-fu is unfortunately there to stay, but this isn't a good reason to keep using it. Python is easier to learn (it is taught as a beginner's language in many universities), will let you do more things....


I will be even better when it is not necessary to shut Gimp down to use one of those little used plug-ins. Which of course you can do with script-fu.

Author:  trandoductin [ Thu Dec 20, 2018 11:47 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Script-fu you have to refresh script after each change.
With Python, once you have the script and its parameters and menu registration in place, you can go to town with editing without the need to refresh scripts.

Author:  MareroQ [ Tue Aug 18, 2020 11:43 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Hi Tin.

In your very useful plugin I found one bug regarding masks:

Old gimp mask:
ADD_ALPHA_TRANSFER_MASK


after using constantize: :lol
ADD_MASK_ALPHA_MASK_TRANSFER


For gimp10 mask when the correct record is:
ADD_MASK_ALPHA_TRANSFER


Best wishes.

Author:  Tas_mania [ Wed Aug 19, 2020 5:24 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Hi Marero,
You could put your scrip update here:
https://gimplearn.net/viewtopic.php?f=3&t=1714&start=20

Tim (tin) is active on that forum. He hasn't been at Gimp Chat for awhile.

Author:  MareroQ [ Thu Aug 20, 2020 1:28 am ]
Post subject:  Re: GIMP10 Constantize Plug-in

Hi Tas_mania - I am not a GIMP LEARN user. :roll:
Temporarily (until the new version is published by Trandoductin) I am posting a correction of 5 errors mentioned in the post #9 and #18.
This version in menu Gimp: Tools/GIMP10 constantize...

Attachments:
gimp10_constantize-V-3.1 GH.zip [4.05 KiB]
Downloaded 104 times

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/