I am making a plugin to sum up the area of all the material in a Sketch. I have succeeded in getting all the faces and such, but now the Components come into the picture.
Im using the term single or multi leveled component as i dont know any better way to explain the occurence of having a component inside an component and so on.
I have noticed that some components also have more to i than just 1 level. So if you go inside one component there may be components embedded inside this component that also have materials. So what i want is to sum up all of the material of a specific component and get all the "recursive" materials, if any, inside the component.
So, how do I count the area of all the material inside an component(single or multileveled)?