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

# Conflicts:
#	Source/Engine/Level/Actors/SplineModel.cpp
#	Source/Engine/Level/Actors/SplineModel.h
This commit is contained in:
Wojtek Figat
2023-07-14 14:10:21 +02:00
16 changed files with 83 additions and 8 deletions

View File

@@ -341,6 +341,23 @@ void SplineModel::OnParentChanged()
OnSplineUpdated();
}
MaterialBase* SplineModel::GetMaterial(int32 entryIndex)
{
if (Model)
Model->WaitForLoaded();
else
return nullptr;
CHECK_RETURN(entryIndex >= 0 && entryIndex < Entries.Count(), nullptr);
MaterialBase* material = Entries[entryIndex].Material.Get();
if (!material)
{
material = Model->MaterialSlots[entryIndex].Material.Get();
if (!material)
material = GPUDevice::Instance->GetDefaultDeformableMaterial();
}
return material;
}
void SplineModel::UpdateBounds()
{
OnSplineUpdated();