/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include #include #include #include #include #include #include #include #if defined (EMOTIONFXANIMATION_EDITOR) # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include #endif // EMOTIONFXANIMATION_EDITOR namespace EMotionFX { namespace Integration { /** * Animation module class for EMotion FX animation gem. */ class EMotionFXIntegrationModule : public CryHooksModule { public: AZ_RTTI(EMotionFXIntegrationModule, "{02533EDC-F2AA-4076-86E9-5E3702202E15}", CryHooksModule); EMotionFXIntegrationModule() : CryHooksModule() { // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here. m_descriptors.insert(m_descriptors.end(), { // System components SystemComponent::CreateDescriptor(), // Runtime components ActorComponent::CreateDescriptor(), AnimAudioComponent::CreateDescriptor(), AnimGraphComponent::CreateDescriptor(), SimpleMotionComponent::CreateDescriptor(), SimpleLODComponent::CreateDescriptor(), #if defined(EMOTIONFXANIMATION_EDITOR) // Pipeline components EMotionFX::Pipeline::PipelineComponent::CreateDescriptor(), // Editor components EditorActorComponent::CreateDescriptor(), EditorAnimAudioComponent::CreateDescriptor(), EditorAnimGraphComponent::CreateDescriptor(), EditorSimpleMotionComponent::CreateDescriptor(), EditorSimpleLODComponent::CreateDescriptor(), // EmotionFX asset builder EMotionFXBuilder::EMotionFXBuilderComponent::CreateDescriptor(), // Actor EMotionFX::Pipeline::Behavior::ActorGroupBehavior::CreateDescriptor(), EMotionFX::Pipeline::Behavior::MorphTargetRuleBehavior::CreateDescriptor(), EMotionFX::Pipeline::Behavior::LodRuleBehavior::CreateDescriptor(), EMotionFX::Pipeline::Behavior::SkeletonOptimizationRuleBehavior::CreateDescriptor(), EMotionFX::Pipeline::ActorExporter::CreateDescriptor(), EMotionFX::Pipeline::ActorGroupExporter::CreateDescriptor(), EMotionFX::Pipeline::ActorBuilder::CreateDescriptor(), EMotionFX::Pipeline::MorphTargetExporter::CreateDescriptor(), // Motion EMotionFX::Pipeline::Behavior::MotionGroupBehavior::CreateDescriptor(), EMotionFX::Pipeline::Behavior::MotionRangeRuleBehavior::CreateDescriptor(), EMotionFX::Pipeline::MotionExporter::CreateDescriptor(), EMotionFX::Pipeline::MotionGroupExporter::CreateDescriptor(), EMotionFX::Pipeline::MotionDataBuilder::CreateDescriptor() #endif // EMOTIONFXANIMATION_EDITOR }); } ~EMotionFXIntegrationModule() { } /** * Add required SystemComponents to the SystemEntity. */ AZ::ComponentTypeList GetRequiredSystemComponents() const override { return AZ::ComponentTypeList{ azrtti_typeid(), }; } }; } } #if defined(EMOTIONFXANIMATION_EDITOR) #include // Qt resources are defined in the EMotionFX.Editor static library, so we must // initialize them manually extern int qInitResources_Resources(); extern int qCleanupResources_Resources(); namespace { struct initializer { initializer() { qInitResources_Resources(); } ~initializer() { qCleanupResources_Resources(); } } dummy; } // namespace #endif // DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM // The first parameter should be GemName_GemIdLower // The second should be the fully qualified name of the class above AZ_DECLARE_MODULE_CLASS(Gem_EMotionFX, EMotionFX::Integration::EMotionFXIntegrationModule)