Fix: USD: Ensure animated velocities are loaded correctly in rare case

If velocity attributes are the only thing being animated, we would fail
to add the cache modifier. This prevents velocity attribute data from
being updated as the timeline changes.

This is a rather rare case. Typically if velocity is changing that would
imply the positions of the mesh are also changing, and the positions
will add the modifier correctly in that case.

Pull Request: https://projects.blender.org/blender/blender/pulls/126105
This commit is contained in:
Jesse Yurkovich
2024-08-08 21:54:18 +02:00
committed by Jesse Yurkovich
parent 3acb5ae41b
commit c862d40e09

View File

@@ -211,7 +211,9 @@ void USDMeshReader::read_object_data(Main *bmain, const double motionSampleTime)
readFaceSetsSample(bmain, mesh, motionSampleTime);
if (mesh_prim_.GetPointsAttr().ValueMightBeTimeVarying()) {
if (mesh_prim_.GetPointsAttr().ValueMightBeTimeVarying() ||
mesh_prim_.GetVelocitiesAttr().ValueMightBeTimeVarying())
{
is_time_varying_ = true;
}