|
|
|
|
@ -312,6 +312,10 @@ namespace O3DE::ProjectManager
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool PythonBindings::RegisterThisEngine()
|
|
|
|
|
{
|
|
|
|
|
bool registrationResult = true; // already registered is considered successful
|
|
|
|
|
bool pythonResult = ExecuteWithLock(
|
|
|
|
|
[&]
|
|
|
|
|
{
|
|
|
|
|
bool registerThis = true;
|
|
|
|
|
|
|
|
|
|
@ -331,15 +335,16 @@ namespace O3DE::ProjectManager
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool result = true;
|
|
|
|
|
if (registerThis)
|
|
|
|
|
{
|
|
|
|
|
auto registrationResult = m_registration.attr("register")(m_enginePath.c_str());
|
|
|
|
|
result = (registrationResult.cast<int>() == 0);
|
|
|
|
|
auto result = m_registration.attr("register")(m_enginePath.c_str());
|
|
|
|
|
registrationResult = (result.cast<int>() == 0);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
AZ_Assert(result, "Registration of this engine failed!");
|
|
|
|
|
return result;
|
|
|
|
|
bool finalResult = (registrationResult && pythonResult);
|
|
|
|
|
AZ_Assert(finalResult, "Registration of this engine failed!");
|
|
|
|
|
return finalResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool PythonBindings::ExecuteWithLock(AZStd::function<void()> executionCallback)
|
|
|
|
|
|