Shortcuts automation apply effect preset from list (or variable)

Talk about Pixelmator Pro, share tips & tricks, tutorials, and other resources.
User avatar

2022-03-05 10:01:21

I need to do the following:
1. Select a number of images.
2. For each image apply 20 effect presets and save the result each time.

So, I will select 3 images, and I will apply the effects, and end up with 60 images.

What I have not found out how to do is to have a list of the effect presets and use a "Repeat with each item" to apply them. Is this possible? I tried setting the filter name to a variable and use "Apply effect preset <variable> ..." but I get an error "Shortcuts couldn't convert from text to effect preset".

Any help will be much appreciated.
User avatar

2022-03-05 10:14:15

Update: I exported the effect presets, I checked the export and found the key (like A31EEEC8-464B-4FFC-8B1D-B411A9D2A6B9) that corresponds to each preset, and tried to use this as the value in automator, but this did not work either.
User avatar

2022-03-09 14:43:22

Hi there! Good shout both with trying to apply effects by name and using their identifiers, that's what I'd have tried too. :smile: The trouble is that, internally, that list actually contains Effect objects, which have both stringified (JSON) preset values and identifiers inside them, so what we check for in the code is actually the object first, and then the identifier/values inside that object.

For dynamically loaded items (which is what that effect preset list contains), I believe this is the only way. Realistically, to get what you need, we'd need a separate action like "Get Effect Preset" which would let you get effect presets by name, for example, or all presets, or some other way. This shouldn't be too hard to do knowing what the entire experience should look like, but we're a bit swamped with other stuff at the moment.

I'm actually the guy who programmed the bulk of Shortcuts support so while I can't promise too much, if I find a spare moment in the next couple of weeks, I'll try and check this out. But it's possible that adjusting the implementation of the current effect preset action will break all existing shortcuts that use that action, so our hands are also tied here a little, too.
User avatar

2022-03-09 19:16:46

Thank you for your response, Andrius! This would be great!

GetEffectPreset would be really cool. And if you are going to implement it, here are some more ideas (I know, I know, just in case :-)

1. GetEffectPreset by preset name
2. GetEffectPresets by collection name (returns list of presets in a specific collection)

In any, case, thank you for the work you have already done!