| Code: |
| # =======================
# === Apply Transform === # ======================= def apply_transform(verts, matrix): x, y, z = verts xloc, yloc, zloc = matrix[3][0], matrix[3][1], matrix[3][2] xcomponent = x*matrix[0][0] + y*matrix[1][0] + z*matrix[2][0] + xloc ycomponent = x*matrix[0][1] + y*matrix[1][1] + z*matrix[2][1] + yloc zcomponent = x*matrix[0][2] + y*matrix[1][2] + z*matrix[2][2] + zloc verts = [xcomponent, ycomponent, zcomponent] return verts |
| Code: |
| for i in range(len(mesh.verts)):
x, y, z = apply_transform(mesh.verts[i].co, matrix) |