blender/source
Kévin Dietrich b183e3ae89 Cleanup: Alembic, use a structure to hold interpolation settings
The Alembic importer can optionnaly interpolate vertex and matrix data.
To detect if two samples can be interpolated `get_weight_and_index`
needs to be called which output the interpolation weight and the indices
for the floor and ceil samples separately. Either the weight or the
indices could be used to determine if interpolation was needed.

This adds a `SampleInterpolationSettings` structure to hold the weight
and indices together so we don't need to manage multiple local
variables, and replaces `get_weight_and_index` with
`get_sample_interpolation_settings` which returns either a
`SampleInterpolationSettings` or nothing if no interpolation is
necessary.

This also modifies `AbcMeshData` to have an optional
`SampleInterpolationSettings` and removes members used for interpolation
from `CDStreamConfig`, which simplifies the latter structure as well as
the check in `read_mverts` to verify if interpolation is needed.

`get_config` also no longer needs a parameter for setting the now removed
`use_vertex_interpolation` member from `CDStreamConfig`. This was only
used for Mesh vertex interpolation despite also being set in the points
reader (which does not yet support any interpolation).

No functional changes.

Pull Request: #109155
2023-07-09 01:26:07 +02:00
..
blender Cleanup: Alembic, use a structure to hold interpolation settings 2023-07-09 01:26:07 +02:00
creator CMake: plumbing for modern CMake usage 2023-06-27 20:57:50 +02:00
CMakeLists.txt Cleanup: Add a copyright notice to files and use SPDX format 2023-05-31 16:19:06 +02:00