Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Can ScriptFu or anything in Gimp automate the creation of layer groups

Tue Jul 12, 2022 6:33 pm

I am working on a project to make popular and niche color based adjustment layers using layer groups and color fill layers. From what it looks like script fu cannot create layer groups. This is tragic because the "adjustment layers" I am making would be modified by script fu. Does anyone know a way to automate the creation of layer groups in Gimp 2.10x?

Re: Can ScriptFu or anything in Gimp automate the creation of layer gr

Tue Jul 12, 2022 7:00 pm

Here are the adjustment layers made using blend modes only.

Image

Image

Image


Image

Re: Can ScriptFu or anything in Gimp automate the creation of layer gr

Tue Jul 12, 2022 7:02 pm

You are misinformed/mistaken:

Image


(same API in Python if you want a decent language).

Re: Can ScriptFu or anything in Gimp automate the creation of layer gr

Tue Jul 12, 2022 7:04 pm

Image


Okay then maybe this project is possible. I need someone to help me!

Re: Can ScriptFu or anything in Gimp automate the creation of layer gr

Tue Jul 12, 2022 7:08 pm

ofnuts wrote:You are misinformed/mistaken:

[ Image ]


(same API in Python if you want a decent language).

I'm glad it is possible. Now there are three things we need to do to have adjustment layers.

1. Python or Script Fu needs to call a custom "open as layers" so we can open the custom xcf layer groups on top of the original image.

2. We need a way to make the complex layer groups represented as simple GUI's in script fu. Modifying GUI in script fu will modify the layer group color fill, opacity and blend modes.

3. Script Fu needs to search and replace the color fill adjustment layers, their opacity, and blend modes when adjustment layers are modified in the GUI.


I hope we can accomplish this!

Re: Can ScriptFu or anything in Gimp automate the creation of layer gr

Wed Jul 13, 2022 7:17 am

No... scripts are... scripts. So you give them a bunch of parameters (Gimp build a nice dialog for that) and let them run until the end.

In Python, you can have scripts with auto-built input dialogs as for Script-fu, or you can have more evolved plugins, but these come with their own UI (usually written with PyGTK).

Re: Can ScriptFu or anything in Gimp automate the creation of layer gr

Wed Jul 13, 2022 8:29 am

So is this possible with the existing tools or not?

Re: Can ScriptFu or anything in Gimp automate the creation of layer gr

Wed Jul 13, 2022 8:38 am

A Varient of open as layers can be made with script fu. This will open the xcf files with layer groups.

Script Fu can search for existing layers and modify them

Script Fu can modify the colors, blend modes, and opacity within existing layer groups


That is all I need for this to work.
Post a reply