To apply all transformations to an object, all its vertices must be multiplied by its global matrix, the matrix itself must be made identity.
To apply all transformations to the active mesh, we need to execute the following:
1 2 3 4 5 6 7 |
import bpy obj = bpy.context.object matrix = obj.matrix_world.copy() for vert in obj.data.vertices: vert.co = matrix @ vert.co obj.matrix_world.identity() |