AN v2.1 for Blender 2.79b
When I link
Polygons Offset node to transform input mesh, it overrides original vertex sorting (Wire view mesh with orange outline is original array, small planes - result of AN transform):
How can I avoid that?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
The Offset Polygons node doesn't just transform the vertices/polygons of the mesh, it also splits polygons if they are connected. So it is impossible to retain the order of vertices in most of the cases, and in cases where it is possible, it is not worth it to consider it as a special case.
So if you want to retain the order of vertices, manually loop over the polygon indices, transform the vertices and write them to their respective locations in the vertices list. Let me know if you want more details on how to do that.
[x for y in a for x in y] converts Polygon Indices (list of tuples) to list, that can be later used as sorting list to relocate vertices. Whole tree (note that Mesh Info node is not in default menu, so search it via Space):
Why is this needed sometimes? For example to correctly join new mesh as shapekey, because this process relies on element order.