Today, 06:36 AM
(Yesterday, 09:29 AM)JohnHammersley Wrote: Hi all!
I'm building assets for an interactive comedy show using GIMP 3. I'm currently working on this ambulance:
It's split into many layers and different combinations of them create the different assets for the show. E.g., here's the ambulance background asset:
I'm looking to automate the export. Ideally, I'd write a Python script something like this (I completely made up the API but you get the idea):
img.hide_all_layers()
img.show_layer('foo')
img.show_layer('bar')
img.export('ambulance-bar.webp', region=img.get_layer('bar').region)
Is something like that possible? Has anyone got any pointers?
Thanks,
Pete.
I have script to do that, but for Gimp 2.10 for the time being. Basically, it iterates layers in the same group(s) and switches them on in turn.
If you have several groups marked, you get all combination of pairs/triplets with one layer for each group. You can also mark layers optional (behaves as if in a group with a transparent layer).