Skip to main content
Question

API refrence to clean up plugin data from layers?


Alx

Hello everyone,

Throughout my projects, I frequently utilize a variety of plugins to optimize my workflow. Recently, as I was developing an Icon library, I incorporated a plugin to expedite the process. However, as I’m preparing to publish the library, I find myself needing to remove all plugin-related data from the properties panel for each icon. Considering the distinct naming conventions used, I’m unable to select multiple items simultaneously for this cleanup.

So I decided to create a plugin to do this, is there an API reference to remove plugin trace from layer with bulk selection? or even better one, inspect layers with plugin data and remove all of them as bulk ?


2 replies

Gleb
  • Power Member
  • 4706 replies
  • August 1, 2024

Unfortunately only the plugin that created these can remove them. I can think of a hack to do this but not sure if it would work 100% (I don’t see why it wouldn’t work though):

  1. Create a new empty plugin
  2. Set its ID to the ID of the plugin that you used (it’s the number in the plugin community page link)
  3. Loop through the nodes (e.g. using Figma.root.findAll) and use setRelaunchData | Plugin API to clear the data in the plugin

Alx
  • Author
  • 35 replies
  • August 1, 2024

Thank you so much, I will try this and will let you know


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings