Merge remote-tracking branch 'origin/master' into 1.10

# Conflicts:
#	Source/Editor/SceneGraph/Actors/StaticModelNode.cs
#	Source/Engine/Graphics/Models/Mesh.cs
#	Source/Engine/Graphics/Models/ModelData.h
This commit is contained in:
Wojtek Figat
2025-03-13 11:23:01 +01:00
34 changed files with 834 additions and 99 deletions

View File

@@ -647,6 +647,7 @@ void Cloth::CalculateInvMasses(Array<float>& invMasses)
if (_paint.Count() != verticesCount)
{
// Fix incorrect paint data
LOG(Warning, "Incorrect cloth '{}' paint size {} for mesh '{}' that has {} vertices", GetNamePath(), _paint.Count(), mesh.ToString(), verticesCount);
int32 countBefore = _paint.Count();
_paint.Resize(verticesCount);
for (int32 i = countBefore; i < verticesCount; i++)
@@ -795,7 +796,10 @@ bool Cloth::OnPreUpdate()
if (!positionStream.IsValid() || !blendIndicesStream.IsValid() || !blendWeightsStream.IsValid())
return false;
if (verticesCount != _paint.Count())
{
LOG(Warning, "Incorrect cloth '{}' paint size {} for mesh '{}' that has {} vertices", GetNamePath(), _paint.Count(), mesh.ToString(), verticesCount);
return false;
}
PROFILE_CPU_NAMED("Skinned Pose");
PhysicsBackend::LockClothParticles(_cloth);
const Span<const Float4> particles = PhysicsBackend::GetClothParticles(_cloth);