[Bf-blender-cvs] [5a97b282e99] master: Fix (unreported) crash when importing data with custom normals.
Bastien Montagne
noreply at git.blender.org
Wed Feb 1 11:06:38 CET 2023
Commit: 5a97b282e990f9d6d111b770520e7e61a4c7cde4
Author: Bastien Montagne
Date: Wed Feb 1 10:53:53 2023 +0100
Branches: master
https://developer.blender.org/rB5a97b282e990f9d6d111b770520e7e61a4c7cde4
Fix (unreported) crash when importing data with custom normals.
The usage of `index` was inverted between destination array of vectors
and source vector in rB3a3d9488a1633.
===================================================================
M source/blender/makesrna/intern/rna_mesh.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 5ab36c1aa7d..0f9b11905fa 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -581,7 +581,7 @@ static void rna_MeshLoop_normal_set(PointerRNA *ptr, const float *values)
float(*layer)[3] = CustomData_get_layer_for_write(&me->ldata, CD_NORMAL, me->totloop);
if (layer) {
- normalize_v3_v3(*layer, values + index);
+ normalize_v3_v3(layer[index], values);
}
}
More information about the Bf-blender-cvs
mailing list