Mesh: Reduce custom normal calculation memory usage #107592

Merged
Hans Goudey merged 32 commits from HooglyBoogly/blender:corner-normals-refactor-storage into main 2023-05-10 14:41:16 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 59bdd13e13 - Show all commits

View File

@ -120,8 +120,8 @@ struct CornerNormalSpaceArray {
Array<int> corner_space_indices;
};
void lnor_space_custom_data_to_normal(const CornerNormalSpace *lnor_space,
const float3 lnor_no_custom,
void lnor_space_custom_normal_to_data(const CornerNormalSpace *lnor_space,
float3 lnor_no_custom,
const float custom_lnor[3],
short r_clnor_data[2]);

View File

@ -434,7 +434,7 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd,
mul_m4_v3(mtx_nor, loop_normals[mirrorj]);
const int space_index = lnors_spacearr.corner_space_indices[mirrorj];
blender::bke::mesh::lnor_space_custom_data_to_normal(&lnors_spacearr.spaces[space_index],
blender::bke::mesh::lnor_space_custom_normal_to_data(&lnors_spacearr.spaces[space_index],
loop_normals[mirrorj],
loop_normals[mirrorj],
clnors[mirrorj]);