manovotny that's currently not possible, neither with the Action API nor with any other system.
What format would you like to add?
ale, I was looking to add a .js format, along with a plugin, that would wrap the SVG in some code.
Quick update: I just uploaded this sample plugin, might be useful if you're working with the Action API: https://github.com/bomberstudios/sketch-action-api-tester
Anyone knows if there a (hidden) "rename layer" action?
FrancisVega noted, thanks for the request
Just throwing in my vote for some additional actions around symbols, e.g. SymbolOverrideChanged
romannurik good one, will add a note for that too
ale I think it'd be useful for the DocumentSaved action to also return a reference to the document in its actionContext. That way we could add custom "post-save hook" behaviors which reference data from the document.
jpencola I agree, and IIRC, we've added that in v43, which is currently in beta.
Why is actions scoped to a per-command level?
matt_sven not sure I'm following, can you elaborate?
ale Actions are at the commands[index].handlers.actions level... but I get it now, I think - it allows for different functions to be called from different scripts.
ale I can't seem to get any of the actions around layer property changes to be called. Any thoughts on why that may be. I've tested with a wildcard * handler and also specific actions like AddShadow but they don't seem to show up in the wildcard or be called explicitly.
WCByrne I'll investigate
WCByrne ok, found the issue. Apparently, the actions are not triggered when using the Inspector, but they are when you use the menus, toolbar buttons or keyboard shortcuts.
That's definitely a bug, and we'll fix that as soon as possible.
ale Thanks for looking into that. It was a bit difficult to discover the actions with incomplete documentation and them not firing as expected.
That said, while I wait, is there any action that will fire when anything about a layer changes?
ale Action request: it would be really useful to have a "ParentChanged" and "SiblingChanged" actions available. I'm working on a couple of plugins that would be greatly simplified (and optimised) if those actions existed...