I have my code running fine retrieving the componentPropertyDefinitions of local components I look up the mainComponent and find the componentSetNode and pull the property definitions there but when I try to pull it from an instance that is from a team library it fails to show it at all just empty javascript object and when I look at the parent node is not a componentSetNode but a page node?
In that example, it works if the component is a local component but if its a component from a team library first the parent is not a componentNodeSet but rather a pageNode. When I run the plugin in the same file as the component that is in a team library it pulls the information with no issue.
Yeah I am sure its a component node I drag the component from the Team library and literally just click it and run the plugin and it shows up as the node.maincomponent.parent is a pagenode rather than a componentSetNode. But When I try the same thing creating an instance of the same component in the local file it was created in it works. I honestly think it’s a bug in Figma because this outcome is not right and I am stumped
Idk what is different I did not change anything with my code but when I open your file it shows the component set and when I went back to my file it now shows as a component set and not a page node… I guess solved? I have screenshots of it as a pagenode no matter what I did.
Oh well I will continue and I will return to this thread if I find the issue again with more insight thank you for your help
In my file, there are only 2 instances whose parent is ComponentSetNode. 2 more instances are instances of individual components that do not have component sets at all. That is, your code (which you provided above) should only print 2 results to the console for instances whose parent is ComponentSetNode.
By the way, I added 2 more instances to the file. And it would be great if you wrote about the results for each instance in order.
1 and 2. Don’t have a ComponentSetNode. The ComponentPropertyDefinitions is at the ComponentNode level.
3 and 4. Have a ComponentSetNode.
5 and 6. Have neither ComponentSetNode nor component properties.
That is, only instances 5 and 6 should have an empty object.