Add ModelInstanceActor::GetMaterialSlots

This commit is contained in:
Wojtek Figat
2023-07-18 10:55:00 +02:00
parent 0f613abfb9
commit 338499536f
8 changed files with 32 additions and 1 deletions

View File

@@ -341,6 +341,14 @@ void SplineModel::OnParentChanged()
OnSplineUpdated();
}
const Span<MaterialSlot> SplineModel::GetMaterialSlots() const
{
const auto model = Model.Get();
if (model && !model->WaitForLoaded())
return ToSpan(model->MaterialSlots);
return Span<MaterialSlot>();
}
MaterialBase* SplineModel::GetMaterial(int32 entryIndex)
{
if (Model)