add/remove gem python bindings

This commit is contained in:
Alex Peterson
2021-05-20 15:13:39 -07:00
committed by GitHub
parent a86f61e360
commit cfbae9a18b
3 changed files with 54 additions and 0 deletions
@@ -508,6 +508,42 @@ namespace O3DE::ProjectManager
}
}
bool PythonBindings::AddGemToProject(const QString& gemPath, const QString& projectPath)
{
bool result = ExecuteWithLock([&] {
pybind11::str pyGemPath = gemPath.toStdString();
pybind11::str pyProjectPath = projectPath.toStdString();
m_registration.attr("add_gem_to_project")(
pybind11::none(), // gem_name
pyGemPath,
pybind11::none(), // gem_target
pybind11::none(), // project_name
pyProjectPath
);
});
return result;
}
bool PythonBindings::RemoveGemFromProject(const QString& gemPath, const QString& projectPath)
{
bool result = ExecuteWithLock([&] {
pybind11::str pyGemPath = gemPath.toStdString();
pybind11::str pyProjectPath = projectPath.toStdString();
m_registration.attr("remove_gem_to_project")(
pybind11::none(), // gem_name
pyGemPath,
pybind11::none(), // gem_target
pybind11::none(), // project_name
pyProjectPath
);
});
return result;
}
bool PythonBindings::UpdateProject([[maybe_unused]] const ProjectInfo& projectInfo)
{
return false;