Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Path autocurves plugin (G2 continuity) for Gimp3.0.6
#1
Here is an updated version of the old "G2 continuity"-plugin that now works on Gimp3.0.6 (as far as I have tested it):

.zip   g2continuity.zip (Size: 10.05 KB / Downloads: 40)

When installed it shows up in the Path context menu and is capable of creating a smooth curved path from one with only linear (straight) segments (ie. no need for manual intervention at the control points).

Credits go to the original author, a user on this forum called "Ottia Tuota" as well as to "tmanni" who ported it to python3 and Gimp2.99. That version does not work on recent releases anymore, so I've tried to adapt it to the current API for Gimp3, making as few changes as possible.

I've never done Gimp plugins before so please excuse me if there are silly mistakes in the registration/create/run setup phase. The rest of the code should be how it was before except that I've had to change all the "vector" API references to the newer "path" variant and updated how selected pixels are spotted.
Reply
#2
(12-08-2025, 08:41 AM)InquisitiveAsHell Wrote: Here is an updated version of the old "G2 continuity"-plugin that now works on Gimp3.0.6 (as far as I have tested it):

Very good, works fine here, kubuntu 24.04, Gimp 3.0.6 appimage

Any users, remember to put g2continuity.py in a folder g2continuity

Thank you.

Edit: There are notes on use here: https://www.gimp-forum.net/Thread-Making...2#pid28752
Reply
#3
Well done. The plugin works in GIMP 3.2.0-RC1. Thanks.
Reply
#4
Work fine here (Ubuntu 24.04LTS).

Thanks a lot! I'll look into is equally amazing "Simplify" path plugin if I can convert it.

Props to Ottia-Tuota for the original, essential plugin, to tmanni for the initial convertion, and to you for finalising it !
Reply
#5
(12-12-2025, 02:03 PM)Scallact Wrote: I'll look into is equally amazing "Simplify" path plugin if I can convert it.

I got a head start on the continuity plugin as tmanni had already done the python3/gimp2.99 migration but I might also have a go at some of the others if I can find the time.

The simplify plugin is a bit longer and has a few more API calls from what I see. You are much more experienced writing plugins than me but if I can be of any help just give me a shout.

On a related note (as I saw you also use a call to "image.get_selected_paths()" in one of your scripts), do you have any idea how to add the path to the procedure arguments (like the gimp2 script did)? I've tried to use "add_path_argument(...)" but the variable always comes through as "None" on the other side. The official documentation feels somewhat lacking on how that functionality is supposed to work.
Reply
#6
(12-13-2025, 05:35 PM)InquisitiveAsHell Wrote: The simplify plugin is a bit longer and has a few more API calls from what I see. You are much more experienced writing plugins than me but if I can be of any help just give me a shout.

On a related note (as I saw you also use a call to "image.get_selected_paths()" in one of your scripts), do you have any idea how to add the path to the procedure arguments (like the gimp2 script did)? I've tried to use "add_path_argument(...)" but the variable always comes through as "None" on the other side. The official documentation feels somewhat lacking on how that functionality is supposed to work.

I'm not sure I'm more experienced than you, I just spent a lot of time (like: a lot!) trying to figure things out. :-)

For your question, is your aim to be able to select the path from the plugin dialog, or to be able to call the plugin from another while passing the path?

In the second scenario, I guess I would use Gimp.Image.set_selected_paths() in the calling script and still use Gimp.Image.get_selected_paths() in the base one. Otherwise, I have no ide, maybe someone more knowledgeable could help.
Reply
#7
(Yesterday, 11:03 AM)Scallact Wrote: For your question, is your aim to be able to select the path from the plugin dialog, or to be able to call the plugin from another while passing the path?

I'm trying to mimic the unified approach the old scripts exhibit. Both the original and tmanni's 2.99 version register the input path as another variable to the run procedure where it is seemingly picked up regardless of whether it has been selected interactively or if it was included in a call from some other script. On an interactive run I suppose a path (or vector) argument was automatically initialized, bypassed the dialog and was sent straight to the run function.

There is a new "procedure.add_path_argument(...)" API function which I suspect is meant to do precisely this but I can't get it to work so I must be missing something. Maybe I need to have a closer look at the fine print on "Gimp.ImageProcedure" vs "Gimp.Procedure".
Reply


Forum Jump: