How to use /usr/share/inkscape/gradients ?
How to use /usr/share/inkscape/gradients ?
How can I use /usr/share/inkscape/gradients ? There are no gradients files at the moment. Are they the same format as GIMP's gradients? How do I use them in Inkscape?
-
- Posts: 39
- Joined: Thu Aug 23, 2012 5:48 am
Re: How to use /usr/share/inkscape/gradients ?
looks like inkscape stores the gradients in the SVG file. to transfer between inkscape and gimp-
http://art.vinayraikar.com/2008/02/playing-with-gradient.html
To import Inkscape gradient into Gimp, just place the SVG file containing the gradient into the gimp gradients folder and refresh the Gradient dialog. The gradients will be imported and you can see them in the gradients dialog.
To import Gimp gradient into Inkscape, you just need to drag and drop the gradients into Inkscape.Now you can just go on filling objects with gradient.
[Inkscape will throw an error while importing some .ggr files (files with CRLF end-of-file). What you can do to import is save it in unix format using a text editor like notepad++. and then import].
http://art.vinayraikar.com/2008/02/playing-with-gradient.html
Re: How to use /usr/share/inkscape/gradients ?
Copying a .ggr file to /usr/share/inkscape/gradients does not offer that gradient in Inkscape. Dragging and dropping a gradient from GIMP to Inkscape has no effect either. Also no errors are reported. Can you give me please preciese instrcutions how to do this with some screenshots? Mostly, I am interested in adding .gg files to /usr/share/inkscape/gradients. Where exactly should these gradients be offered in Inkscape?
Re: How to use /usr/share/inkscape/gradients ?
This directory is currently not used by Inkscape (Inkscape does not maintain a library of gradients stored outside the current document). AFAICT this directory is a remnant from an earlier reorganisation of the shared resources directory structure (and like the unused 'fonts' directory more an indication of an earlier version of the roadmap for future development than actually a representation of implemented features).Pander wrote:Mostly, I am interested in adding .gg files to /usr/share/inkscape/gradients.
You can import GGR files via the regular 'File > Import…' file chooser dialog: there exists a file type entry for "GIMP Gradient (*.ggr)" in the popup menu below the file listing which is based on an internal plugin.
- The source code for this internal plugin is here: gimpgrad.h, gimpgrad.cpp (stable release branch).
- After having imported a GIMP gradient file, you can then choose the imported gradient in the current document the same way you can choose any of the existing gradients created in Inkscape itself (via gradient tool controls bar, or in 'Fill&Stroke').
Re: How to use /usr/share/inkscape/gradients ?
OK, thanks, that works.
Would it be OK to create a feature request that .ggr files in ~/.config/inkscape/gradients/ and /usr/share/inkscape/gradients/ are always available in the linear and radial gradient fill selection without them being imported into the current SVG until the get selected? Also, upon saving, the unused gradients should be purged from the SVG when identical gradients exist in the aforementioned directories in order to do some garbage collection.
Would it be OK to create a feature request that .ggr files in ~/.config/inkscape/gradients/ and /usr/share/inkscape/gradients/ are always available in the linear and radial gradient fill selection without them being imported into the current SVG until the get selected? Also, upon saving, the unused gradients should be purged from the SVG when identical gradients exist in the aforementioned directories in order to do some garbage collection.
Re: How to use /usr/share/inkscape/gradients ?
Pander wrote:Would it be OK to create a feature request that .ggr files in ~/.config/inkscape/gradients/ and /usr/share/inkscape/gradients/ are always available in the linear and radial gradient fill selection without them being imported into the current SVG until the get selected?
Filing yet another series of feature requests which are already in the tracker (maybe with slight variations) won't really be helpful at the moment (IMVHO) - time could be spent instead working e.g. on mockups for a more detailed blueprint, or on details about proposed user interfaces and implementation. AFAIU there are also likely missing SVG features which currently are not supported by Inkscape and would have to be implemented first (e.g. load paint servers like gradients and patterns from external files, to be able to support loading to and from external resource files (instead of copying the gradient definition into the current document)).
Related reports (I only did a quick search, there are probably plenty of others around, since this is hardly a new feature no one has been thinking about in all those years inkscape has been around):
- Bug #170931 (sf1297450) “Gradient collection”
- Bug #171825 (sf1685976) “Save gradients in inkscape and export gradients”
- Bug #397796 “Allow external paint servers”
- Bug #170214 “merge identical patterns/gradients/markers”
- Bug #950677 “Gradient toolbar enhancements / disable gradient editor”
- Bug #722017 “UI - Better Gradient Window”
(the last two track some of the recent changes in the development version to the refactored gradient tool (which got more features added to the controls bar), and to 'Fill & Stroke' with regard to implement a minimal gradient manager, and additional improvements for editing of gradients)
Trouble with such a concept is for example sharing or publishing SVG files while not risking to loose data (custom gradients stored for the current user, but not on any other system will result in data loss (missing gradients) when sharing the file, or when publishing on the web without extra precautions).Pander wrote:Also, upon saving, the unused gradients should be purged from the SVG when identical gradients exist in the aforementioned directories in order to do some garbage collection.
Re: How to use /usr/share/inkscape/gradients ?
OK, thanks. I will add my ideas to the appropriate existing bug reports. Also improve my last remark with something like "when the unused gradients were not available in the SVG upon opening it" For me, this thread can be closed.
Re: How to use /usr/share/inkscape/gradients ?
There is for example an existing blueprint (Gradient Presets) without any additional details: maybe you could contact the author and work on a more detailed specification (which could be hosted in the Inkscape Wiki and linked to the blueprint, like for example done for this blueprint: UI - Gradient Window).
(blueprints related to gradient (search result))
(blueprints related to gradient (search result))