GNOME Bugzilla – Bug 168541
allow arbitrary XCF files as templates for new images
Last modified: 2018-05-24 11:26:54 UTC
As a work-around for other gimp limitations (Bug #165023 for example, but there are other uses -- cafepress.com templates come to mind), people working with transparency must frequently add and remove more-or-less undesired layers to their images. Please add something to make this automatic. Suggestion: Let the user choose some set of layers to appear in EVERY image, being placed there as the image is loaded. Have these layers marked to be excluded when the image is saved, so that they don't end up in the resulting file. So if I do "gimp foo.xcf", where foo.xcf does not contain any such layers, the layers will be added for the duration of my editing. The layers are not saved back into foo.xcf, some new bar.xcf file, or into any other (*.png for example) file. BTW, in case you think this is horrid, note that the simple and obvious idea was rejected. Perhaps it would be better to reconsider that instead. But hey, this might be easier to code and generally useful. One could use this feature for dealing with cafepress.com templates, a trianglular grid guide pattern, whatever...
This report doesn't even explain what global layers are. It speaks about some layers that appear in every image, without saying what these layers are about nor why they are needed. This bug report is crap. Closing as INCOMPLETE.
It sure does explain, even providing several examples. Think of this as guide layers. One could use them as a custom grid for example, or as a crutch to work around the lack of non-grey transparancy indication. Suppose one wanted to draw lots of images for a game, all using some other image as a guide. Set that guide image as a global layer, and then it appears in every image being edited.
So if I understand correctly, you would like to have what you call "global layers" as a kind of template that is automatically included in every image that you open but these special layers would never be saved. This would be a bit similar to what you can do today with the grid for aligning elements on the screen, but you would like to extend this to have non-rectangular grids or to have templates for tee-shirts, mugs or other shapes. I hope that I got this right. This can be an interesting feature for these (rather specialized) use cases, but I don't think that it should be implemented as special layers. "global layers" would be very confusing IMHO. It would be better to propose a new coherent framework for grid/templates (not to be confused with templates for new images).
Comment #3 has the idea right. One may want the layer to always be on top, or to always be on the bottom. (called "float mode" and "sink mode" maybe) One may want both. Perhaps the user puts a hex grid on top, and a T-shirt template or green grass background on the bottom. If I were drawing game pieces, I'd want to have the gimp set to always load some sort of guide image every time I open a file. My own primary use would be with solid green or magenta, as a way to see transparancy with grey objects. While any one use of the feature might be considered a rather specialized use case, so many uses exist that I do not think this feature should be considered all that obscure.
Why not confuse it with templates? Loading XCF files with the templates is almost implemented. This might be a good place for such a rarely used feature.
I'm not exactly sure what comment #5 is supposed to mean, but if it involves some awkward operation when loading the file, then no. The whole point is to avoid that, via a persistant setting. Then it is easy to work on lots of images, using the same setup for all.
It means that you can specify an XCF file to load with the template you select in the Image New dialog.
This is in any case an enhancement request; changing severity accordingly.
Confirming this bug report and changing the summary according to the suggested way to implement it. This could probably be done by having a ~/.gimp-2.x/templates/ directory in which one could store XCF files to be used as templates (and another one in $prefix for the shared templates). It would be nice to find a smart way to avoid scanning these directories every time the New Image dialog is invoked. There is a trade- off between requiring an explicit refresh once in a while and having a delay every time the dialog is used.
I think the intention of the original report is rather applying such a template (which would only consist of layer(s) in this case) to an image. The approach I would take in this case would be to write a script that does this and bind a keyboard shortcut to it, which would also give more flexibility when adding a layer below or above some other layers, or mix them with a series of images. (Heh, how about embedding script-fu in XCF files and execute them when the file is loaded - to finally enable "virus" support for the Win32 platform and to get on par with industry standard apps ;) However, this report reminds me more of emacs file load and save hooks than just templates.
Raphael, there is already a directory ~/.gimp-2.x/templates and there is already a filename field in the template which has been added for exactly this reason. And there is absolutely no reason why one would have to scan the directory when using the New Image dialog.
*** Bug 144437 has been marked as a duplicate of this bug. ***
*** Bug 563976 has been marked as a duplicate of this bug. ***
*** Bug 565799 has been marked as a duplicate of this bug. ***
*** Bug 740314 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/132.