Merge remote-tracking branch 'origin/master' into linux-editor

# Conflicts:
#	Source/Engine/Core/Math/Color.cs
#	Source/Engine/Navigation/Navigation.cpp
#	Source/Engine/Platform/Win32/Win32Platform.cpp
This commit is contained in:
Wojtek Figat
2021-02-23 22:29:07 +01:00
147 changed files with 1740 additions and 1311 deletions

View File

@@ -431,6 +431,67 @@ String MaterialParameter::ToString() const
return String::Format(TEXT("\'{0}\' ({1}:{2}:{3})"), _name, ::ToString(_type), _paramId, _isPublic);
}
MaterialParameter* MaterialParams::Get(const Guid& id)
{
MaterialParameter* result = nullptr;
for (int32 i = 0; i < Count(); i++)
{
if (At(i).GetParameterID() == id)
{
result = &At(i);
break;
}
}
return result;
}
MaterialParameter* MaterialParams::Get(const StringView& name)
{
MaterialParameter* result = nullptr;
for (int32 i = 0; i < Count(); i++)
{
if (At(i).GetName() == name)
{
result = &At(i);
break;
}
}
return result;
}
int32 MaterialParams::Find(const Guid& id)
{
int32 result = -1;
for (int32 i = 0; i < Count(); i++)
{
if (At(i).GetParameterID() == id)
{
result = i;
break;
}
}
return result;
}
int32 MaterialParams::Find(const StringView& name)
{
int32 result = -1;
for (int32 i = 0; i < Count(); i++)
{
if (At(i).GetName() == name)
{
result = i;
break;
}
}
return result;
}
int32 MaterialParams::GetVersionHash() const
{
return _versionHash;
}
void MaterialParams::Bind(MaterialParamsLink* link, MaterialParameter::BindMeta& meta)
{
ASSERT(link && link->This);