I noticed that flattened Vectors do not get all of the fill information of their sub-vectors serialized from the REST api.
Take the following nodes, for example:
The “Flattened” vector node has the same child vectors as the “Grouped” node. When requesting the document information via the REST api, the flattened node only sends JSON for the first fill of its sub-vectors, but will return JSON for the fill/stroke geometry for all of its sub-vectors.
For the flattened vector node, this is what is sent from the REST api - “Vector 1” and “Vector 2” have different fills, but only the fill for “Vector 2” ends up getting serialized:
As far as I understand, the only way to get an accurate representation of a Vector node via the REST api is if the vector is NOT flattened. If it is flattened, it will only be accurate so long as there is only one kind of fill being used for the whole vector.
Am I missing something? Is there some other way to get a full representation of a flattened Vector node’s fills and path geometry?
If not, I think it would be helpful to change how flattened vectors get serialized via the api. Text nodes have
styleOverrideTable properties; perhaps vectors could return extra fill information in a similar format, ie.
EDIT: Just saw the REST api changelog from Nov 9 that adds this change to serialized vector nodes, awesome work and thank you Figma devs <3