diff options
Diffstat (limited to 'source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc')
-rw-r--r-- | source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc index a7508f01b0f..e92f70472d0 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc @@ -207,7 +207,10 @@ void OBJMesh::calc_poly_order() blender::parallel_sort(poly_order_.begin(), poly_order_.end(), [&](int a, int b) { int mat_a = mpolys[a].mat_nr; int mat_b = mpolys[b].mat_nr; - return mat_a < mat_b; + if (mat_a != mat_b) { + return mat_a < mat_b; + } + return a < b; }); } |