UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimCompressionDerivedData.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6
7#if WITH_EDITOR
8#include "DerivedDataPluginInterface.h"
9#endif
10
12
15
16#if WITH_EDITOR
17
19// FDerivedDataAnimationCompression
20class FDerivedDataAnimationCompression : public FDerivedDataPluginInterface
21{
22private:
23 // The anim data to compress
25
26 // The Type of anim data to compress (makes up part of DDC key)
27 const TCHAR* TypeName;
28
29 // Bulk of asset DDC key
30 const FString AssetDDCKey;
31
32 // FAnimCompressContext to use during compression if we don't pull from the DDC
35public:
36 FDerivedDataAnimationCompression(const TCHAR* InTypeName, const FString& InAssetDDCKey, TSharedPtr<FAnimCompressContext> InCompressContext);
39
41 {
43 }
44
46
48 {
49 return DataToCompressPtr.IsValid() ? DataToCompressPtr->GetApproxMemoryUsage() : 0;
50 }
51
52 virtual const TCHAR* GetPluginName() const override
53 {
54 return TypeName;
55 }
56
57 virtual const TCHAR* GetVersionString() const override;
58
59 virtual FString GetPluginSpecificCacheKeySuffix() const override
60 {
61 return AssetDDCKey;
62 }
63
64 virtual FString GetDebugContextString() const override;
65
66 virtual bool IsBuildThreadsafe() const override
67 {
68 return true;
69 }
70
71 virtual bool Build( TArray<uint8>& OutDataArray) override;
72
74 bool CanBuild()
75 {
76 return DataToCompressPtr.IsValid();
77 }
78};
79
81{
82 extern FDerivedDataUsageStats UsageStats;
83}
84
85#endif //WITH_EDITOR
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
Definition Array.h:670
Definition SharedPointer.h:692
Definition AnimCompress.h:231