Fix: USD: Don't attempt to export the special custom_normal attribute

Suppress exporting this attribute as there's no conversion to USD that
supports its data type (2d, 16-bit int) and because mesh normals (from
the `corner_normals` API) are already exported. This causes a rather
annoying UI Warning notification that the attribute isn't convertible
during export.

Pull Request: https://projects.blender.org/blender/blender/pulls/135271
This commit is contained in:
Jesse Yurkovich
2025-02-28 01:47:37 +01:00
committed by Jesse Yurkovich
parent 322abbd311
commit 1833d79231

View File

@@ -157,7 +157,7 @@ void USDGenericMeshWriter::write_custom_data(const Object *obj,
* Skip edge domain because USD doesn't have a good conversion for them. */
if (iter.name[0] == '.' || bke::attribute_name_is_anonymous(iter.name) ||
iter.domain == bke::AttrDomain::Edge ||
ELEM(iter.name, "position", "material_index", "velocity", "crease_vert"))
ELEM(iter.name, "position", "material_index", "velocity", "crease_vert", "custom_normal"))
{
return;
}