Help! Plugin killed by last update - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +--- Thread: Help! Plugin killed by last update (/Thread-Help-Plugin-killed-by-last-update) |
Help! Plugin killed by last update - carmen - 05-16-2017 Hello! Just registered in search of ... HELP! I was happy with the grup_chfont.py plugin from the Gimp plugin repository: change font and/or size along a whole Group Layer. I dare say that anybody ever using the Gimp for maps/labeled graphics can understand the logic of * put all your text layers (may easily grow to 20 or more) into a Group Layer to hide/show with one click * copy said Group Layer and run a plugin to batch-change the font (and perhaps its size) * try the different settings on export. The plugin worked fine until the last update to 2.8.2--then, error message--python cannot pickle ?? As python is over my head, I hope somebody can take a hand at fixing the code--while the Gimp plugin repository worked, I got the notion that such compatibility issues required often only slight changes in the code ... and lots of know-how to make them! If anybody is interested, I am attaching the actual plugin--released under GNU General Public License v2--its author doesn't seem to be available in any recent forum. Thanks a lot! RE: Help! Plugin killed by last update - Ofnuts - 05-16-2017 Could be a regression, but yes, it seems you cannot have a GroupLayer as a parameter to a plugin. Coded two workarounds:
Zip above contains both, they cannot be used together for the time being, you have to pick one or the other. Little testing, so handle with care, and report any problems. PS: can you confirm you were on 2.8.2 (not 2.8.20) when it worked and that upgrading to 2.8.22 broke the plugin? RE: Help! Plugin killed by last update - carmen - 05-17-2017 Thank you, Ofnuts! 1. Just tested: * Variant Group worked without trouble in Group Layer (no nesting--haven't needed any yet) for both font and size; * Variant Siblings 'couldn't pickle': on second thoughs, and after having removed it and restored the other, my own fault; acting by rote, I called it from the parent Group Layer. As 'old dogs won't learn new tricks', I'd rather stick to the Group variant--please, say if you would have more testing OF BOTH, and I'll zip them and put into the Repository... 2. I was on 2.8.18 when the plugin last worked--at the end of last year. I am under Windows 7--updates for us aren't so frequent--nor do I meet a labeled illustration for an epub every other day. Many thanks again. RE: Help! Plugin killed by last update - Ofnuts - 05-17-2017 If you put something on the repository (assuming you still can) people will ask you to maintain it. I can adopt the script but selecting groups means that you cannot use it to resize layers outside groups, which IMO would be a frequent requirement. Maybe a compromise would be to check the "linked" status of things. Also, I assume that a nice option would be to keep some specific point of the layers(or of the "bounding box" of the characters in the layers) at the same place? Currently the top right corner is fixed, but I reckon that many people would love to see the center of the layer remain fixed? RE: Help! Plugin killed by last update - carmen - 05-17-2017 (05-17-2017, 07:19 AM)Ofnuts Wrote: If you put something on the repository (assuming you still can) people will ask you to maintain it.* Sorry--I didn't explain myself. My meaning: as both versions (Group & Sibling) are incompatible (same register), I thought of keeping BOTH easily available, by putting zipped copies of each in \user\gimp-2.8\plug-ins_storage--if your Add-on Manager allows for such a folder--I have implemented only _storage for seldom used brushes and fonts. As some font families I could name have incompatibility problems--i.e., drop both xRegular and xBold in \user\gimp-2.8\fonts and xfont comes always bold--an alternative workaround to a font manager is to keep both zipped into \user\gimp-2.8\fonts_storage, and call only one by session. As I say, I have never tested this workaround for plug-ins--but it surely should do? * Your comments on the advantages of the Siblings version--aren't rather meant for another plug-in (by the same author?--I never got it) to batch resize--offset--and... layers in a group? I think that text layers are peculiar that way, if one wishes to keep them as editable text. Besides changing font and font-size, the only other batch operations I can think of as both safe and useful are - convert to path - set text-alignment (but when text is a label, one usually aligns it more or less to whatever element in the drawing should act as anchor...) - set letter-spacing - set line-spacing - set hinting Everything else--fine kerning and adjusting position of layer--seems to ask for human intervention... Thanks again--my original problem is now solved beautifully! RE: Help! Plugin killed by last update - Ofnuts - 05-17-2017 The add-on manager doesn't work for plugins. These are only registered when Gimp starts. No too hard to make them distinct:
RE: Help! Plugin killed by last update - rich2005 - 05-18-2017 Just a thought, but you could approach from the other direction, change all fonts except those in a folder. Which is what the Akkana Peckplugin does https://github.com/akkana/gimp-plugins/blob/master/changefont.py RE: Help! Plugin killed by last update - Ofnuts - 05-18-2017 As far as I can see, Akkana's script changes everything. I don't see any way to "protect" a folder. RE: Help! Plugin killed by last update - rich2005 - 05-18-2017 I do try everything I suggest. This was just looking from a different aspect. Rather than changing the text in a layer group, change the text outside the layer group. It will mean a bit more work, but I seem to recall plugins that pack/unpack (can't remember the term) layergroups before http://i.imgur.com/dYyszYt.jpg after http://i.imgur.com/Vm5nxz3.jpg The original plugin group_chfont.py does not work in Gimp 2.9.5 either, so it is not only post Gimp 2.8.18 RE: Help! Plugin killed by last update - Ofnuts - 05-18-2017 Oh, I see. Actually, you are just lucky, Akkana's script only deals with top level elements, it won't recursively explore layer groups. Carmen has an interesting approach, she makes groups with the layers that will always have the same size/font, so she just has to designate the group. |