Fix #115521: Voxel remesh resets smooth with attribute propagation off

Add a special case for the sharp_face attribute to use the sharpness
of the first face, the same as before ba1c8fe6a5
This commit is contained in:
Hans Goudey
2023-11-28 12:45:14 -05:00
parent 321c1af26e
commit 81abaaad6b

View File

@@ -164,6 +164,11 @@ static int voxel_remesh_exec(bContext *C, wmOperator *op)
if (mesh->flag & ME_REMESH_REPROJECT_ATTRIBUTES) {
bke::mesh_remesh_reproject_attributes(*mesh, *new_mesh);
}
else {
const VArray<bool> sharp_face = *mesh->attributes().lookup_or_default<bool>(
"sharp_face", ATTR_DOMAIN_FACE, false);
BKE_mesh_smooth_flag_set(new_mesh, !sharp_face[0]);
}
BKE_mesh_nomain_to_mesh(new_mesh, mesh, ob);