RSS/Atom feed Twitter
Site is read-only, email is disabled

Merging visible paths via scripts

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

Merging visible paths via scripts Gino D 24 May 10:37
  Merging visible paths via scripts Joao S. O. Bueno 24 May 14:05
   Merging visible paths via scripts Gino D 24 May 18:47
   Merging visible paths via scripts Ofnuts 24 May 22:52
Merging visible paths via scripts ginodonig@gmail.com 26 May 10:46
Gino D
2012-05-24 10:37:37 UTC (over 12 years ago)

Merging visible paths via scripts

Hi.

I'm searching for the Script-Fu procedure corresponding to the "Merge Visible Paths" widget available in the "Path" context menu, but so far I have been able neither to find it nor to devise a way to do the same by using other procedures.

Have I missed something? Or the reason is that the Procedure Database doesn't currently provide this unique command yet? If so, is there anyone who can suggest or at least draft me a code snippet aimed to implement the aforesaid operation?

Thanks in advance.

Joao S. O. Bueno
2012-05-24 14:05:59 UTC (over 12 years ago)

Merging visible paths via scripts

On 24 May 2012 07:37, Gino D wrote:

Hi.

I'm searching for the Script-Fu procedure corresponding to the "Merge Visible Paths" widget available in the "Path" context menu, but so far I have been able neither to find it nor to devise a way to do the same by using other procedures.

Have I missed something? Or the reason is that the Procedure Database doesn't currently provide this unique command yet? If so, is there anyone who can suggest or at least draft me a code snippet aimed to implement the aforesaid operation?

Indeed - there are no vectors merging calls whatsoever on the PDB - for the time being, the only way to merge vectors using a script or plug-on is to explictly adding strokes read from other vectors to another vector. (using gimp-vectors-stroke-new-from-points ).

Coding an algorithm that loops through an image vectors, cehck which are visible, and for each visible vectors object, read its strokes, and add them to the target vectors is the way to go. Other, higher level languages, can make this task easier than in scheme - like Python.

On the other hand, indeed, there should be some support for that on the PDB - could you open a bug at https://bugzilla.gnome.org/ asking for this feature?
Maybe you could even come to do some work on its developement on a nearby future, in order for it to be in gimp 2.10.

js ->

Thanks in advance.
_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-developer-list

Gino D
2012-05-24 18:47:28 UTC (over 12 years ago)

Merging visible paths via scripts

On Thu, May 24, 2012 at 4:05 PM, Joao S. O. Bueno wrote:

Indeed - there are no vectors merging calls whatsoever on the PDB - for the time being, the only way to merge vectors using a script or plug-on is to explictly adding strokes read from other vectors to another vector. (using gimp-vectors-stroke-new-from-points ).

I suspected this, now I have confirmation.

Coding an algorithm that loops through an image vectors, cehck which are visible, and for each visible vectors object, read its strokes, and add them to the target vectors is the way to go. Other, higher level languages, can make this task easier than in scheme - like Python.

That's a good suggestion. Hence I think that for this purpose I will try to operate with Python as soon as I have learned to handle this language sufficiently.

On the other hand, indeed, there should be some support for that on the PDB - could you open a bug at https://bugzilla.gnome.org/ asking for this feature?

I don't know if I really can. In fact, unless rules have changed recently (can you confirm?), whenever in the past I have tried to open any bugs of this type at Bugzilla Gnome, I was responded that wished features are not real bugs but they must be submitted in this mailing list instead.

Maybe you could even come to do some work on its developement on a nearby future, in order for it to be in gimp 2.10.

At present I'm only skilled in scripting, but I hope one day to become able to edit the source code too. If and when I succeed, I shall not fail to contribute to this feature. Thanks for the proposal.

Ofnuts
2012-05-24 22:52:25 UTC (over 12 years ago)

Merging visible paths via scripts

On 05/24/2012 04:05 PM, Joao S. O. Bueno wrote:

Indeed - there are no vectors merging calls whatsoever on the PDB - for the time being, the only way to merge vectors using a script or plug-on is to explictly adding strokes read from other vectors to another vector. (using gimp-vectors-stroke-new-from-points ). Coding an algorithm that loops through an image vectors, cehck which are visible, and for each visible vectors object, read its strokes, and add them to the target vectors is the way to go. Other, higher level languages, can make this task easier than in scheme - like Python.

Indeed, this is a piece of cake/SMOP in Python.

On the other hand, indeed, there should be some support for that on the PDB - could you open a bug at https://bugzilla.gnome.org/ asking for this feature? Maybe you could even come to do some work on its developement on a nearby future, in order for it to be in gimp 2.10. js ->

If the PBD emulates the current "manual" version (all paths are replaced by a single, merged one) scripts will often have to copy the paths first, so we are back to square one :)

ginodonig@gmail.com
2012-05-26 10:46:44 UTC (over 12 years ago)

Merging visible paths via scripts

On 25/05/2012 22.28, Ofnuts wrote:

I developped my first python scripts on Windows, but I must say that switching to Linux (which I did for other reasons) greatly eased this kind of work. In your first runs you weed out the synatx errors, but if you run the script directly in Gimp you won't see much since the syntax errors will even prevent it from registering... Take the habit to run the script outside of Gimp; "python your_plugin.py" in a command prompt, if you have blatant syntax errors they will show then and be a lot easier to fix. You can move to Gimp when it only complains about importing "gimpfu" (if it gets this far the syntax is OK).

That's interesting. I will bear these suggestions in mind. Thank you again.