[Bf-blender-cvs] [ef40604b87f] blender-v3.4-release: Fix T103051: Changed behavior when removing a material slot
Hans Goudey
noreply at git.blender.org
Wed Dec 14 22:23:27 CET 2022
Commit: ef40604b87fa4d1b8231a9813363392026001540
Author: Hans Goudey
Date: Tue Dec 13 13:36:48 2022 -0600
Branches: blender-v3.4-release
https://developer.blender.org/rBef40604b87fa4d1b8231a9813363392026001540
Fix T103051: Changed behavior when removing a material slot
Before f1c0249f34c4171ec311 the material was assigned to the previous
slot rather than the next. Though the behavior is arbitrary, there
is no reason to change it.
===================================================================
M source/blender/blenkernel/intern/mesh.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc
index 0018c217964..f89e87f2991 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -1364,7 +1364,7 @@ void BKE_mesh_material_index_remove(Mesh *me, short index)
}
MutableVArraySpan<int> indices_span(material_indices.varray);
for (const int i : indices_span.index_range()) {
- if (indices_span[i] > 0 && indices_span[i] > index) {
+ if (indices_span[i] > 0 && indices_span[i] >= index) {
indices_span[i]--;
}
}
More information about the Bf-blender-cvs
mailing list