Is there a Shortcut to Decompose a selected component

Hey there!

Is there a Shortcut to Decompose a selected component?
I tried to use Jens Kutilek’s plugin with his script (Decompose selection), but it Decomposes all the components in the glyph regardless mt selection.

The only way that works is if I select the comp, Right click on it, and hit Decompose. But I’m trying to get a shortcut for that.

Thanks a lot in advance.

for component in Layer.components:
	if component.selected:

Run this code with the component(s) selected you want to decompose. You can also save this as a script and put it into your scripts folder, assigning a shortcut to the script.

1 Like

Amazing. As always, thanks a lot for your help. Much appreciated.

I hope the code is understandable to you; learning to write even just really small scripts like this will save you an immense amount of time.

1 Like

I agree. I must do it. I thought there should be a way to create a shortcut for this action…
The script works btw, but when putting it in the script folder, I can’t see it, even after refresh/quit the app… Is there something that I miss?

Screenshot 2023-01-03 at 5.56.50 AM

with what file extension did you save the file?

1 Like

You’re right! I forgot to change to .py

Thanks a lot for the tip!