yuanqing / figma-plugins

:fire: Monorepo for my Figma plugins
https://figma.com/@yuanqing
MIT License
239 stars 32 forks source link

Clean Document: Deleting layer flexibility #7

Closed allanpmaltais closed 4 years ago

allanpmaltais commented 4 years ago

Hey đź‘‹

Apologies for posting a question here. Happy to reach out elsewhere if you prefer. Just point me in the right direction.


My team was looking at using Clean Document for a project and wondering if there's a way to avoid deleting all hidden layers.

The cases where this is most prominent are assets with multiple states that we need to show and hide (some elements will be hidden based on the displayed state). Let me know if there's anything we can do to avoid clearing those all out.

Thanks in advance!

yuanqing commented 4 years ago

Currently, the only way is to run the command without checking the “Delete hidden layers” checkbox. The plugin does not allow for hidden layers to be retained on a ”per-layer“ basis

yuanqing commented 4 years ago

Related to https://github.com/yuanqing/figma-plugins/issues/6

yuanqing commented 4 years ago

The Clean Layers command now provides an option to Skip locked layers. If this option is checked, locked layers (and all their nested children) will be skipped from processing.