// Copyright Epic Games, Inc. All Rights Reserved. /*----------------------------------------------------------------------------- Data structures only used for importing skeletal meshes and animations. -----------------------------------------------------------------------------*/ #pragma once #include "CoreMinimal.h" #include "Containers/IndirectArray.h" #include "ReferenceSkeleton.h" #include "Engine/SkeletalMesh.h" #include "Rendering/SkeletalMeshLODImporterData.h" class UAssetImportData; class UMorphTarget; class UPhysicsAsset; class USkeletalMeshSocket; class USkeleton; class UThumbnailInfo; class FSkeletalMeshLODModel; struct FExistingMeshLodSectionData { FExistingMeshLodSectionData(FName InImportedMaterialSlotName, bool InbCastShadow, bool InbRecomputeTangents, ESkinVertexColorChannel InRecomputeTangentsVertexMaskChannel, int32 InGenerateUpTo, bool InbDisabled) : ImportedMaterialSlotName(InImportedMaterialSlotName), bCastShadow(InbCastShadow), bRecomputeTangents(InbRecomputeTangents), RecomputeTangentsVertexMaskChannel(InRecomputeTangentsVertexMaskChannel), GenerateUpTo(InGenerateUpTo), bDisabled(InbDisabled) {} FName ImportedMaterialSlotName; bool bCastShadow; bool bRecomputeTangents; ESkinVertexColorChannel RecomputeTangentsVertexMaskChannel; int32 GenerateUpTo; bool bDisabled; }; struct FExistingSkelMeshData { TArray ExistingSockets; TArray> ExistingOriginalReductionSourceMeshData; TIndirectArray ExistingLODModels; TArray ExistingLODInfo; FReferenceSkeleton ExistingRefSkeleton; TArray ExistingMaterials; bool bSaveRestoreMaterials; TArray ExistingMorphTargets; TArray ExistingPhysicsAssets; UPhysicsAsset* ExistingShadowPhysicsAsset; USkeleton* ExistingSkeleton; TArray ExistingRetargetBasePose; USkeletalMeshLODSettings* ExistingLODSettings; TSubclassOf ExistingPostProcessAnimBlueprint; TSoftObjectPtr ExistingDefaultAnimatingRig; ////////////////////////////////////////////////////////////////////////// bool bExistingUseFullPrecisionUVs; bool bExistingUseHighPrecisionTangentBasis; TArray ExistingMirrorTable; TWeakObjectPtr ExistingAssetImportData; TWeakObjectPtr ExistingThumbnailInfo; TArray ExistingClothingAssets; bool UseMaterialNameSlotWorkflow; // The existing import material data (the state of sections before the reimport) TArray ExistingImportMaterialOriginalNameData; TArray> ExistingImportMeshLodSectionMaterialData; // The last import material data (fbx original data before user changes) TArray LastImportMaterialOriginalNameData; TArray> LastImportMeshLodSectionMaterialData; FSkeletalMeshSamplingInfo ExistingSamplingInfo; FPerPlatformInt MinLOD; FPerPlatformBool DisableBelowMinLodStripping; bool bOverrideLODStreamingSettings; FPerPlatformBool bSupportLODStreaming; FPerPlatformInt MaxNumStreamedLODs; FPerPlatformInt MaxNumOptionalLODs; TMap ExistingAssetUserData; USkeletalMesh::FOnMeshChanged ExistingOnMeshChanged; TMap ExistingUMetaDataTagValues; FVector PositiveBoundsExtension; FVector NegativeBoundsExtension; }; /** * Optional data passed in when importing a skeletal mesh LDO */ class FSkelMeshOptionalImportData { public: FSkelMeshOptionalImportData() {} /** extra data used for importing extra weight/bone influences */ FSkeletalMeshImportData RawMeshInfluencesData; int32 MaxBoneCountPerChunk; }; /** * Data needed for importing an extra set of vertex influences */ struct FSkelMeshExtraInfluenceImportData { FReferenceSkeleton RefSkeleton; TArray Influences; TArray Wedges; TArray Faces; TArray Points; int32 MaxBoneCountPerChunk; };