[LYN-2514] Adding get engine gem infos to the python bindings

This commit is contained in:
Benjamin Jillich
2021-06-02 17:49:40 +02:00
parent 235cd1f937
commit 53615230c1
3 changed files with 27 additions and 0 deletions
@@ -438,6 +438,26 @@ namespace O3DE::ProjectManager
}
}
AZ::Outcome<QVector<GemInfo>, AZStd::string> PythonBindings::GetEngineGemInfos()
{
QVector<GemInfo> gems;
auto result = ExecuteWithLockErrorHandling([&]
{
for (auto path : m_manifest.attr("get_engine_gems")())
{
gems.push_back(GemInfoFromPath(path));
}
});
if (!result.IsSuccess())
{
return AZ::Failure<AZStd::string>(result.GetError().c_str());
}
std::sort(gems.begin(), gems.end());
return AZ::Success(AZStd::move(gems));
}
AZ::Outcome<QVector<GemInfo>, AZStd::string> PythonBindings::GetAllGemInfos(const QString& projectPath)
{
QVector<GemInfo> gems;