Posts: 1,052
Threads: 87
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
Hi,
Is there a plug-in similar to ofn-export-layers.py but that unlike this would export the paths instead of the layers?
I want to export the customs fonts paths to use with fontForge.
The only way I know is to export each path one by one.
Thx.
Posts: 6,396
Threads: 278
Joined: Oct 2016
Reputation:
566
Operating system(s):
Gimp version: 3.00RC1
04-08-2021, 05:12 PM
(This post was last modified: 04-08-2021, 07:45 PM by Ofnuts.)
Can you wait a couple of hours?
Edit: it appears that in the regular export path file dialog, there is a selector that lets you export all the paths:
However all the paths end up in the same file, so I'll finish the script
Posts: 1,052
Threads: 87
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
(04-08-2021, 05:12 PM)Ofnuts Wrote: Can you wait a couple of hours?
I can expect a lot more than that.
I was thinking that this would not be possible or feasible.
Ofnuts thanks for your attention!
Posts: 6,396
Threads: 278
Joined: Oct 2016
Reputation:
566
Operating system(s):
Gimp version: 3.00RC1
04-08-2021, 09:30 PM
(This post was last modified: 04-08-2021, 09:30 PM by Ofnuts.)
(04-08-2021, 07:48 PM)Krikor Wrote: (04-08-2021, 05:12 PM)Ofnuts Wrote: Can you wait a couple of hours?
I can expect a lot more than that.
I was thinking that this would not be possible or feasible.
Ofnuts thanks for your attention!
I didn't think either but a quick check showed that there was an API call to export a path so it was easy to adapt ofn-export-layers.
ofn-export-paths at the usual place.
If you can think of some path characteristic that can be usefully included in the file name, just ask.
Posts: 1,052
Threads: 87
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
(04-08-2021, 09:30 PM)Ofnuts Wrote: I didn't think either but a quick check showed that there was an API call to export a path so it was easy to adapt ofn-export-layers.
ofn-export-paths at the usual place.
If you can think of some path characteristic that can be usefully included in the file name, just ask.
Perfect!
The option to export All paths or Only visible paths provided the plug-in with greater versatility (I think there is no such option in ofn-export-layers.py), so I see this as a bonus!
I think that if it were possible to add a pattern to the file name based on an alphabetical order it would be welcome.
Almost similar to what the plug-in is already doing with the options:
numUp0, numUp1, numDown0, numDown1.
Only in this case it would be from ' a' to ' Z', and it would completely replace the path name.
For example:
For the paths:
Selection, Selection #1, Selection #2, ..., Selection #52 (Bottom to top).
1-Selection #1.svg, 2-Selection #2.svg, ..., 52-Selection #52.svg.
Alphabetically it would be ( with the removal in the initial name of the path):
a.svg, b.svg, c.svg, ..., Z.svg.
52-Selection #52.svg, 51-Selection #51.svg, 50-Selection #50.svg, ..., 1-Selection #1.svg.
Alphabetically it would look like:
Z.svg, Y.svg, X.svg, ..., a.svg.
The order being:
a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - q - r - s - t - u - v - w - x - y - z - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z
I don't know how hard it would be to implement this suggestion, but the time savings it would give to those who are creating typography would be huge.
Thx a lot!
Posts: 6,396
Threads: 278
Joined: Oct 2016
Reputation:
566
Operating system(s):
Gimp version: 3.00RC1
04-09-2021, 06:26 AM
(This post was last modified: 04-09-2021, 06:51 AM by Ofnuts.)
Why don't you name the paths that way and use {name}? What is the problem you are trying to solve?
Posts: 1,052
Threads: 87
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
(04-09-2021, 06:26 AM)Ofnuts Wrote: Why don't you name the paths that way and use {name}? What is the problem you are trying to solve?
Because with {name} part of the path name is kept.
If the path name is already in the correct format (a, b, c, etc.); so using {name} is enough.
But depending on how the path is generated or if it is created individually, then there is a need to change the name of each path one by one before applying the plug-in; Or later, changing the name of the files, but as the icons of the svg files do not display a preview of the image (unlike .jpg, png, etc.) this would require a lot of attention.
But ok, the plug-in looks great, thanks a lot!
Posts: 1,052
Threads: 87
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
Hi,
It would be possible; and if so, how could i add a separator between the indexed number and the total number in the file name generated by the parameter: {numDown1: 03d} {count}?
I tried something like {numDown1: 03d} {"-" count} and {numDown1: 03d} {- count}, but it didn't work.
The intention is to create a separator for the generated names like:
001127
002127
003127
...
127127
to something like 001-127. etc.
Thx in advance!
Posts: 6,396
Threads: 278
Joined: Oct 2016
Reputation:
566
Operating system(s):
Gimp version: 3.00RC1
04-24-2021, 05:14 PM
(This post was last modified: 04-24-2021, 05:20 PM by Ofnuts.)
(04-24-2021, 03:58 PM)Krikor Wrote: Hi,
It would be possible; and if so, how could i add a separator between the indexed number and the total number in the file name generated by the parameter: {numDown1: 03d} {count}?
I tried something like {numDown1: 03d} {"-" count} and {numDown1: 03d} {- count}, but it didn't work.
The intention is to create a separator for the generated names like:
001127
002127
003127
...
127127
to something like 001-127. etc.
Thx in advance!
Of course, but the - separator isn't part of the format specifications, so just put it outside the braces {numDown1:03d}-{count}. The pattern is a string where what is between {} is replaced by values, but whats is outside the {} is used literally. You can use a pattern like: Path {numDown1} of a set of {count} paths.
PS: You likely want to avoid the leading space in your : 03d formats.
|