Merge branch 'blender-v4.1-release'

This commit is contained in:
Hans Goudey
2024-03-15 13:58:12 -04:00
3 changed files with 6 additions and 3 deletions
@@ -114,7 +114,7 @@ void BKE_mesh_calc_edges_legacy(Mesh *mesh);
void BKE_mesh_do_versions_cd_flag_init(Mesh *mesh);
void BKE_main_mesh_legacy_convert_auto_smooth(Main &bmain);
void BKE_main_mesh_legacy_convert_auto_smooth(Main &bmain, bool new_ids_only = false);
/**
* Calculate/create edges from tessface data
@@ -1375,10 +1375,10 @@ void BKE_blendfile_append(BlendfileLinkAppendContext *lapp_context, ReportList *
instantiate_context.active_collection = nullptr;
loose_data_instantiate(&instantiate_context);
BKE_main_mesh_legacy_convert_auto_smooth(*bmain, true);
BKE_main_id_newptr_and_tag_clear(bmain);
blendfile_link_append_proxies_convert(bmain, reports);
BKE_main_mesh_legacy_convert_auto_smooth(*bmain);
}
void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *reports)
@@ -2261,7 +2261,7 @@ static ModifierData *create_auto_smooth_modifier(Object &object,
} // namespace blender::bke
void BKE_main_mesh_legacy_convert_auto_smooth(Main &bmain)
void BKE_main_mesh_legacy_convert_auto_smooth(Main &bmain, const bool new_ids_only)
{
using namespace blender::bke;
@@ -2277,6 +2277,9 @@ void BKE_main_mesh_legacy_convert_auto_smooth(Main &bmain)
if (object->type != OB_MESH) {
continue;
}
if (new_ids_only && (object->id.tag & LIB_TAG_NEW) == 0) {
continue;
}
Mesh *mesh = static_cast<Mesh *>(object->data);
const float angle = mesh->smoothresh_legacy;
if (!(mesh->flag & ME_AUTOSMOOTH_LEGACY)) {