PythonAssetBuilderModule.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AzCore/Memory/SystemAllocator.h>
  9. #include <AzCore/Module/Module.h>
  10. #include <AzToolsFramework/API/PythonLoader.h>
  11. #include <PythonAssetBuilderSystemComponent.h>
  12. namespace PythonAssetBuilder
  13. {
  14. class PythonAssetBuilderModule
  15. : public AZ::Module
  16. , public AzToolsFramework::EmbeddedPython::PythonLoader
  17. {
  18. public:
  19. AZ_RTTI(PythonAssetBuilderModule, "{35C9457E-54C2-474C-AEBE-5A70CC1D435D}", AZ::Module);
  20. AZ_CLASS_ALLOCATOR(PythonAssetBuilderModule, AZ::SystemAllocator);
  21. PythonAssetBuilderModule()
  22. : AZ::Module()
  23. {
  24. m_descriptors.insert(m_descriptors.end(), {
  25. PythonAssetBuilderSystemComponent::CreateDescriptor(),
  26. });
  27. }
  28. // Add required SystemComponents to the SystemEntity.
  29. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  30. {
  31. return AZ::ComponentTypeList{};
  32. }
  33. };
  34. }
  35. #if defined(O3DE_GEM_NAME)
  36. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), PythonAssetBuilder::PythonAssetBuilderModule)
  37. #else
  38. AZ_DECLARE_MODULE_CLASS(Gem_PythonAssetBuilder_Editor, PythonAssetBuilder::PythonAssetBuilderModule)
  39. #endif