{LYN-4514} Engine updates to enable PAB for the Blast Gem (#2140)
* {LYN-4514} Engine updates to enable PAB for the Blast Gem
* Engine updates to enable Python Asset Building for the Blast Gem
* added API to detect IsPythonActive()
* ExportProductList behavior
* scene manifest usage of generated assetinfo
* updated ScriptProcessorRuleBehavior to handle OnPrepareForExport
Tests: new tests for scene behavior via ExportProduct
Signed-off-by: Jackson <23512001+jackalbe@users.noreply.github.com>
* updated base on PR feedback
added more comments for IsPythonActive()
added a serializeContext for export product list
Signed-off-by: Jackson <23512001+jackalbe@users.noreply.github.com>
This commit is contained in:
@@ -237,8 +237,8 @@ namespace EditorPythonBindings
|
||||
{
|
||||
ec->Class<PythonSystemComponent>("PythonSystemComponent", "The Python interpreter")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System"))
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System"))
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -284,10 +284,10 @@ namespace EditorPythonBindings
|
||||
ReleaseFunction m_releaseFunction;
|
||||
};
|
||||
ReleaseInitalizeWaiterScope scope([this]()
|
||||
{
|
||||
m_initalizeWaiter.release(m_initalizeWaiterCount);
|
||||
m_initalizeWaiterCount = 0;
|
||||
});
|
||||
{
|
||||
m_initalizeWaiter.release(m_initalizeWaiterCount);
|
||||
m_initalizeWaiterCount = 0;
|
||||
});
|
||||
|
||||
if (Py_IsInitialized())
|
||||
{
|
||||
@@ -327,6 +327,11 @@ namespace EditorPythonBindings
|
||||
return result;
|
||||
}
|
||||
|
||||
bool PythonSystemComponent::IsPythonActive()
|
||||
{
|
||||
return Py_IsInitialized() != 0;
|
||||
}
|
||||
|
||||
void PythonSystemComponent::WaitForInitialization()
|
||||
{
|
||||
m_initalizeWaiterCount++;
|
||||
|
||||
Reference in New Issue
Block a user