Alembic: deduplicate data reading between IPolyMesh and ISubD
Alembic represents subdivision meshes (`ISubD`) separately from "regular" meshes (`IPolyMesh`). Since subdivision meshes seem seldomly used, most of the improvements and bug fixes regarding mesh data reading were implemented for the IPolyMesh reader but not the ISubD reader. This resulted in diverging implementations leading to bugs seemingly resurfacing when subdivision meshes are used. This extends `AbcMeshData` to hold the rest of the common data between polygon and subdivision meshes and deduplicates some code in order to keep the implementations aligned and bring bug fixes and improvements to subdivision meshes. The polymesh and subd readers now each create an instance `AbcMeshData` as a basis to read all common mesh data between the two mesh types. To that effect, `read_subd_sample` is now merged info `read_mesh_sample` which takes an `AbcMeshData` as input instead of a specific schema. As a result of this merge, generated coordinates are now read for subdivision meshes. `read_mesh_sample` now also checks whether the topology has changed, thus bringing the safety checks for polygon meshes to subdivision meshes. Therefore, this function is also now responsible for creating a new mesh if need be. Detection of topological changes are extracted from `AbcMeshReader` into a free function using `AbcMeshData` as input. This PR also implements `AbcObjectReader.topology_changed` for subdivision meshes. Finally, the UVs-related fields from `AbcMeshData` were moved to `CDStreamConfig` to keep the former structure const in function calls. This PR makes no attemps at reading FaceSets as materials for subdivision meshes as we do for polygon meshes. This might require moving some logic in a common `AbcGenericMeshReader` base class. Pull Request: https://projects.blender.org/blender/blender/pulls/159195
K
Kévin Dietrich committed
19e75b5f7d4e119376c3fae64cfc45dd3d3a528b
Parent: 1320c2b
Committed by Kévin Dietrich <kevindietrich@noreply.localhost>
on 6/2/2026, 2:36:06 AM