# Equivalent of mesh.tessfaces.add, foreach_set in 2.8

I have the following code in an addon:

mesh = bpy.data.meshes.new("test")
mesh.tessfaces.add(len(self.faces))
mesh.tessfaces.foreach_set("vertices_raw", unpack_face_list(self.faces))


However, it looks like the tessfaces API has been removed. I've found this forum thread which seems relevant to my issues, but I'm not exactly sure how the mentioned code snippet would be applied in my case.

For reference, self.faces is an array of an array of 3 vertices, eg

self.faces = [[1,2,3], [2,3,4]]

• Were you able to find a solution? This problem seems annoying enough at the moment – Pastrokkio Feb 19 at 11:16
• @Pastrokkio Unfortunately not... – Matt M. Feb 20 at 3:15