Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAras Pranckevicius <aras@nesnausk.org>2022-03-22 07:37:55 +0300
committerAras Pranckevicius <aras@nesnausk.org>2022-03-22 07:39:50 +0300
commit8c072cdc935c6cd6ccb7babd48df3809577c6e71 (patch)
tree37506d925711a78aefeaa1008fc27bb3dc63249f /source/blender/io/wavefront_obj
parent127baac44d5c198c8d5159f70cf17167cd2f7e1f (diff)
Obj: try to fix Linux tests
Related to previous D14368 bug fix, the sorting operator was not necessarily a stable order sort.
Diffstat (limited to 'source/blender/io/wavefront_obj')
-rw-r--r--source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc5
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;
});
}