{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:
@@ -11,40 +11,56 @@
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <SceneAPI/SceneCore/Components/BehaviorComponent.h>
|
||||
#include <SceneAPI/SceneCore/Events/AssetImportRequest.h>
|
||||
#include <SceneAPI/SceneCore/Components/ExportingComponent.h>
|
||||
#include <SceneAPI/SceneCore/Events/ExportEventContext.h>
|
||||
|
||||
namespace AzToolsFramework
|
||||
{
|
||||
class EditorPythonEventsInterface;
|
||||
}
|
||||
|
||||
namespace AZ
|
||||
namespace AZ::SceneAPI::Events
|
||||
{
|
||||
namespace SceneAPI
|
||||
class PreExportEventContext;
|
||||
}
|
||||
|
||||
namespace AZ::SceneAPI::Containers
|
||||
{
|
||||
class Scene;
|
||||
}
|
||||
|
||||
namespace AZ::SceneAPI::Behaviors
|
||||
{
|
||||
class SCENE_DATA_CLASS ScriptProcessorRuleBehavior
|
||||
: public SceneCore::BehaviorComponent
|
||||
, public Events::AssetImportRequestBus::Handler
|
||||
{
|
||||
namespace Behaviors
|
||||
{
|
||||
class SCENE_DATA_CLASS ScriptProcessorRuleBehavior
|
||||
: public SceneCore::BehaviorComponent
|
||||
, public Events::AssetImportRequestBus::Handler
|
||||
{
|
||||
public:
|
||||
AZ_COMPONENT(ScriptProcessorRuleBehavior, "{24054E73-1B92-43B0-AC13-174B2F0E3F66}", SceneCore::BehaviorComponent);
|
||||
public:
|
||||
AZ_COMPONENT(ScriptProcessorRuleBehavior, "{24054E73-1B92-43B0-AC13-174B2F0E3F66}", SceneCore::BehaviorComponent);
|
||||
|
||||
~ScriptProcessorRuleBehavior() override = default;
|
||||
~ScriptProcessorRuleBehavior() override = default;
|
||||
|
||||
SCENE_DATA_API void Activate() override;
|
||||
SCENE_DATA_API void Deactivate() override;
|
||||
static void Reflect(ReflectContext* context);
|
||||
SCENE_DATA_API void Activate() override;
|
||||
SCENE_DATA_API void Deactivate() override;
|
||||
static void Reflect(ReflectContext* context);
|
||||
|
||||
// AssetImportRequestBus::Handler
|
||||
SCENE_DATA_API Events::ProcessingResult UpdateManifest(
|
||||
Containers::Scene& scene,
|
||||
ManifestAction action,
|
||||
RequestingApplication requester) override;
|
||||
// AssetImportRequestBus::Handler
|
||||
SCENE_DATA_API Events::ProcessingResult UpdateManifest(
|
||||
Containers::Scene& scene,
|
||||
ManifestAction action,
|
||||
RequestingApplication requester) override;
|
||||
|
||||
private:
|
||||
AzToolsFramework::EditorPythonEventsInterface* m_editorPythonEventsInterface = nullptr;
|
||||
};
|
||||
} // namespace SceneData
|
||||
} // namespace SceneAPI
|
||||
} // namespace AZ
|
||||
|
||||
protected:
|
||||
bool LoadPython(const AZ::SceneAPI::Containers::Scene& scene);
|
||||
void UnloadPython();
|
||||
bool DoPrepareForExport(Events::PreExportEventContext& context);
|
||||
|
||||
private:
|
||||
AzToolsFramework::EditorPythonEventsInterface* m_editorPythonEventsInterface = nullptr;
|
||||
AZStd::string m_scriptFilename;
|
||||
|
||||
struct ExportEventHandler;
|
||||
AZStd::shared_ptr<ExportEventHandler> m_exportEventHandler;
|
||||
};
|
||||
} // namespace AZ::SceneAPI::Behaviors
|
||||
|
||||
Reference in New Issue
Block a user