It is currently 13 Apr 2021, 00:37
| ||||
| ||||
|
|

Apply and Save/Load Preset Script for Layer Effects (Experimental)

- tim
- View:
|Posts
- Topic Posts: 18/54 | Posts: 5358
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 78,103.83 GLP
- Bank: 369,147,380.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3136
- x 1074
- Contact:
Re: Apply and Save/Load Preset Script for Layer Effects (Experimental)
I think the error is just GIMP's front end type checking and not letting anything other than color type to pass through.
I don't know how to get around that.
I don't know how to get around that.
aka Tin
Enjoying it so much!
It would be cool to have a option to call more than one filter successively.
I made a candle preset following Blue Lightning TV as a guide. Just apply the presets in order (Bevel/Emboss, Inner Glow, Stroke);
Bevel & Emboss
candle|(image,layer,1, 65.0, 0, 54.0, 10.0, 100.0, 30.0, 0, (255, 255, 255), 4, 75.0, (0, 0, 0), 3, 75.0, 0, False, 'Rain', 100.0, 100.0, False, True)
Inner Glow
candle|(image,layer,(0, 0, 0), 75.0, 0, 0.0, 9, 1, 0.5, 16.0, True)
Stroke
candle|(image,layer,(0, 0, 0), 100.0, 0, 3.0, 50.0, True)
It would be cool to have a option to call more than one filter successively.
I made a candle preset following Blue Lightning TV as a guide. Just apply the presets in order (Bevel/Emboss, Inner Glow, Stroke);
Bevel & Emboss
candle|(image,layer,1, 65.0, 0, 54.0, 10.0, 100.0, 30.0, 0, (255, 255, 255), 4, 75.0, (0, 0, 0), 3, 75.0, 0, False, 'Rain', 100.0, 100.0, False, True)
Inner Glow
candle|(image,layer,(0, 0, 0), 75.0, 0, 0.0, 9, 1, 0.5, 16.0, True)
Stroke
candle|(image,layer,(0, 0, 0), 100.0, 0, 3.0, 50.0, True)
- tim
- View:
|Posts
- Topic Posts: 18/54 | Posts: 5358
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 78,103.83 GLP
- Bank: 369,147,380.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3136
- x 1074
- Contact:
Break-through with version 6 along with altered layerfx.py
short story: You can use gradient for inner_glow and outer_glow and gradient/pattern for stroke
long story: layerfx.py's definition of front end only accepts PDB_COLOR, I changed it to PDB_STRING so that gradient and patterns can be passed in tuples or string, then inside the procedures before validation I try to convert it back to gimpcolor.RGB which is default type for color, and if it's gradient then it's just a string and it works. For stroke I try to convert it to tuple, if the first element is an int i try to make it gimpcolor.RGB, else it's just a tuple representing gradient params or pattern params and now it's all good.
short story: You can use gradient for inner_glow and outer_glow and gradient/pattern for stroke
long story: layerfx.py's definition of front end only accepts PDB_COLOR, I changed it to PDB_STRING so that gradient and patterns can be passed in tuples or string, then inside the procedures before validation I try to convert it back to gimpcolor.RGB which is default type for color, and if it's gradient then it's just a string and it works. For stroke I try to convert it to tuple, if the first element is an int i try to make it gimpcolor.RGB, else it's just a tuple representing gradient params or pattern params and now it's all good.
aka Tin
- tim
- View:
|Posts
- Topic Posts: 18/54 | Posts: 5358
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 78,103.83 GLP
- Bank: 369,147,380.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3136
- x 1074
- Contact:
Dionisio, since you've named all your presets the same name (candle), I thought I would write a "Load Preset Apply All" which loads all the presets, and you can choose "candle" and it'll try to apply all layer effects presets that are named "candle". I hope this satisfies your needs for running more than one preset at the same time. Try it out in version 7 (or later) and let me know if this works to fit your needs.Dionísio wrote: ↑16 Dec 2018, 16:50Enjoying it so much!
It would be cool to have a option to call more than one filter successively.
I made a candle preset following Blue Lightning TV as a guide. Just apply the presets in order (Bevel/Emboss, Inner Glow, Stroke);
Bevel & Emboss
candle|(image,layer,1, 65.0, 0, 54.0, 10.0, 100.0, 30.0, 0, (255, 255, 255), 4, 75.0, (0, 0, 0), 3, 75.0, 0, False, 'Rain', 100.0, 100.0, False, True)
Inner Glow
candle|(image,layer,(0, 0, 0), 75.0, 0, 0.0, 9, 1, 0.5, 16.0, True)
Stroke
candle|(image,layer,(0, 0, 0), 100.0, 0, 3.0, 50.0, True)
aka Tin
- tim
- View:
|Posts
- Topic Posts: 18/54 | Posts: 5358
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 78,103.83 GLP
- Bank: 369,147,380.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3136
- x 1074
- Contact:
version 9 (hack to allow new layer modes [in addition to legacy modes] to be selected to be saved and applied as presets and loads works with these new layer modes as well)
I believe this is what @Krikor asked for about layer modes.
I believe this is what @Krikor asked for about layer modes.
aka Tin
Downloaded! Going to run some tests. I got stuck making some world maps in GIMP, I'm thinking where I could apply some layer effects in these.
So, I tried opening a new image and trying my old "candle" preset in the new apply all. It got an error on the inner glow layer; I tried re-doing it (the preset) but the problem persisted. In both cases the bevel/emboss worked without problems, but any affect after inner glow didn't. The screenshot:
(edit: the new layer modes seems to be working fine though, in the individuals apply/save and load)
(edit: the new layer modes seems to be working fine though, in the individuals apply/save and load)
- tim
- View:
|Posts
- Topic Posts: 18/54 | Posts: 5358
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 78,103.83 GLP
- Bank: 369,147,380.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3136
- x 1074
- Contact:
@Dionísio ,
I was able to reproduce your error using your "candle" settings.
The problem is caused because you chose to Merge with layer, so after the first effect is applied, the pointer to the old layer is no longer valid because the newly merged layer is a new layer.
So I have changed the script (version 10) to run of based on layer name this way it doesn't error out, it always tries to apply the next effect based on the same layer name which can be a new resulting layer which is fine.
Please give version 10 a try and let me know.
I was able to reproduce your error using your "candle" settings.
The problem is caused because you chose to Merge with layer, so after the first effect is applied, the pointer to the old layer is no longer valid because the newly merged layer is a new layer.
So I have changed the script (version 10) to run of based on layer name this way it doesn't error out, it always tries to apply the next effect based on the same layer name which can be a new resulting layer which is fine.
Please give version 10 a try and let me know.
aka Tin
Words cannot express how much I love this.
Ran a few tests, applying the same presets on the same text varying it's size.
Amazing plugin!
Ran a few tests, applying the same presets on the same text varying it's size.
Amazing plugin!

- tim
- View:
|Posts
- Topic Posts: 18/54 | Posts: 5358
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 78,103.83 GLP
- Bank: 369,147,380.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3136
- x 1074
- Contact:
@Dionísio ,
Right on, I am very glad you like it.
Right on, I am very glad you like it.
aka Tin
| ||||
| ||||
|
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Only first time visitors will have to load everything from server
by tim » 25 Dec 2020, 13:35 » in GIMP/GL Interests - 1 Replies
- 757 Views
-
Last post by tim
25 Dec 2020, 14:14
-
-
- 0 Replies
- 1346 Views
-
Last post by RJKD
02 Oct 2020, 13:21
-
- 0 Replies
- 998 Views
-
Last post by tim
23 Oct 2020, 12:28
-
- 2 Replies
- 993 Views
-
Last post by Jappaloe63
24 Nov 2020, 11:43
-
-
Custom Font Perspex Effects for Gimp 2.10
by skinnyhouse » 03 Jun 2020, 11:50 » in GIMP Python Fu Scripts/Plug-ins - 5 Replies
- 4205 Views
-
Last post by skinnyhouse
13 Jun 2020, 19:21
-
-
-
Update to Custom Font Metallic Effects to 0.06 for Gimp 2.10.20
by skinnyhouse » 17 Jun 2020, 14:42 » in GIMP Python Fu Scripts/Plug-ins - 1 Replies
- 2073 Views
-
Last post by mahvin
17 Jun 2020, 22:54
-
-
- 2 Replies
- 2012 Views
-
Last post by sweeneyMark
19 Jun 2020, 13:21
Who is online
Users browsing this forum: No registered users and 23 guests