[Bf-blender-cvs] [a73a2d345ff] master: Fix T104044: keep order of UVMaps on load
Martijn Versteegh
noreply at git.blender.org
Tue Jan 24 18:31:12 CET 2023
Commit: a73a2d345fffa89375e6838405b1e82cac76a8c2
Author: Martijn Versteegh
Date: Tue Jan 24 11:14:41 2023 +0100
Branches: master
https://developer.blender.org/rBa73a2d345fffa89375e6838405b1e82cac76a8c2
Fix T104044: keep order of UVMaps on load
Use a Vector<std::string> , instead of a Set<std::string> as a Set does
not keep the same order when iterating over it.
Differential Revision: https://developer.blender.org/D17103
===================================================================
M source/blender/blenkernel/intern/mesh_legacy_convert.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
index be68bfe7c65..a60dfa3a19c 100644
--- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
@@ -1616,9 +1616,9 @@ void BKE_mesh_legacy_convert_uvs_to_generic(Mesh *mesh)
const std::string default_uv = StringRef(
CustomData_get_render_layer_name(&mesh->ldata, CD_MLOOPUV));
- Set<std::string> uv_layers_to_convert;
+ Vector<std::string> uv_layers_to_convert;
for (const int uv_layer_i : IndexRange(CustomData_number_of_layers(&mesh->ldata, CD_MLOOPUV))) {
- uv_layers_to_convert.add_as(CustomData_get_layer_name(&mesh->ldata, CD_MLOOPUV, uv_layer_i));
+ uv_layers_to_convert.append(CustomData_get_layer_name(&mesh->ldata, CD_MLOOPUV, uv_layer_i));
}
for (const StringRefNull name : uv_layers_to_convert) {
More information about the Bf-blender-cvs
mailing list