Fix (unreported) wrong alignement handling for mat4x4f DNA struct.
Code was using the `struct_index` instead of the `type_index` to set the alignement value for this struct, effectively setting that alignement value for another struct/type than `mat4fx4f`. Found while working on naming cleanups of maksdna code. Pull Request: https://projects.blender.org/blender/blender/pulls/125777
This commit is contained in:
@@ -549,14 +549,10 @@ static bool init_structDNA(SDNA *sdna, bool do_endian_swap, const char **r_error
|
||||
uint dummy_index = 0;
|
||||
const int mat4x4f_struct_index = DNA_struct_find_index_without_alias_ex(
|
||||
sdna, "mat4x4f", &dummy_index);
|
||||
if (mat4x4f_struct_index >= 0) {
|
||||
#if 0 /* FIXME: This is using the wrong index. Code should be: */
|
||||
if (mat4x4f_struct_index > 0) {
|
||||
SDNA_Struct *struct_info = sdna->structs[mat4x4f_struct_index];
|
||||
const int mat4x4f_type_index = struct_info->type_index;
|
||||
sdna->types_alignment[mat4x4f_type_index] = alignof(blender::float4x4);
|
||||
#else
|
||||
sdna->types_alignment[mat4x4f_struct_index] = alignof(blender::float4x4);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user