Script GIMP: Layer Settings
A script to read/write layer settings from/in text file. Settings are opacity, visibility and modeDernière modification le Lundi 21 Mars 2005 à 21h54
Contents
Description
Layer Settings is a script to read and write layer presets in a text file.
This is useful if you use different layer settings to achieve several effect
in your image, and don't want to copy each settings as one dedicated XCF
file.
Version 1.0 (first release).
Download
Here's the script layer-settings.scm.
Install
To install it, just copy layer-settings.scm under directory
˜/.gimp-2.2/scripts/.
You should find "Write Layer Settings" and "Read Layer Settings"
under <Image>/Script-Fu/Utils/.
Note: If GIMP is already launched, use Exts/Script-fu/Refresh ti update scripts list.
Example
Here's a simple use case:
- download Wilbur Construction Kit ( Wilber_Construction_Kit_XP.xcf.gz).
- open Wilber_Construction_Kit_XP.xcf in GIMP.
- download file wilbur.txt
- use <Image>/Script-Fu/Utils/Read Layer Settings and choose file wilbur.txt to obtain Wilbur
- download file superwilma.txt
- use <Image>/Script-Fu/Utils/Read Layer Settings and choose file superwilma.txt to obtain Super Wilma
- Build your own favorite Wilbur, use script <Image>/Script-Fu/Utils/Write Layer Settings, choose filename mywilbur.txt.
- close Wilber_Construction_Kit_XP.xcf without saving modifications
- open Wilber_Construction_Kit_XP.xcf again.
- use <Image>/Script-Fu/Utils/Read Layer Settings and choose file mywilbur.txt and your favorite Wilber appear again
Internals
For "Write Layer Settings", the script goes through the image
layer list and writes in a file the following attributes: opacity, mode,
visibility and layer name.
For "Read Layer Settings", the script reads file and update layer
attributes accordingly; layer name is used as reference.
The file format is a simple text file. The first line is "Gimp layer settings 1.0". Then following lines contain attributes, one line per layer. Data are "opacity mode visibility name".
Eric Lamarque (attention: pas de pub!)