diff --git a/source/blender/io/ply/exporter/ply_export_load_plydata.cc b/source/blender/io/ply/exporter/ply_export_load_plydata.cc index 570ffd755c6..b00101bfe35 100644 --- a/source/blender/io/ply/exporter/ply_export_load_plydata.cc +++ b/source/blender/io/ply/exporter/ply_export_load_plydata.cc @@ -174,7 +174,7 @@ void load_plydata(PlyData &plyData, Depsgraph *depsgraph, const PLYExportParams BKE_object_get_pre_modified_mesh(&export_object_eval_); bool force_triangulation = false; - const OffsetIndices faces = mesh->faces(); + OffsetIndices faces = mesh->faces(); for (const int i : faces.index_range()) { if (faces[i].size() > 255) { force_triangulation = true; @@ -186,6 +186,7 @@ void load_plydata(PlyData &plyData, Depsgraph *depsgraph, const PLYExportParams bool manually_free_mesh = false; if (export_params.export_triangulated_mesh || force_triangulation) { mesh = do_triangulation(mesh, export_params.export_triangulated_mesh); + faces = mesh->faces(); manually_free_mesh = true; }