I created a plugin dedicated to hide/show some instances in a file or in the current page.
I currently try to do it with two instances, based on the name of the ComponentNode linked.
This is how it looks like :
“Specs markers” instances can be deleted without any issue on my document and on another document.
“UXW markers” instances can be deleted on my document, but on another document I have an error :
Removing this node is not allowed
Which is weird because the script does exactly the same thing, and it’s working on my test file.
Do you have any idea of what can be the reason ?
This is how it works basically :
instances = figma.root.findAll( node => node.mainComponent && node.mainComponent.remote && node.mainComponent.parent && node.mainComponent.parent.name === target); instances.forEach ( instance => instance.remove());