UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
StaticMeshSourceData.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
11
12#include "StaticMeshSourceData.generated.h"
13
14
15struct FMeshDescription;
17
18
22UCLASS(MinimalAPI)
30
31
35USTRUCT()
37{
39
41
42public:
43#if WITH_EDITOR
51 class FRawMeshBulkData* RawMeshBulkData;
52
53 /*
54 * Accessor to Load and save the raw mesh or the mesh description depending on the editor settings.
55 * Temporary until we deprecate the RawMesh.
56 */
57 ENGINE_API bool IsRawMeshEmpty() const;
58 ENGINE_API void LoadRawMesh(struct FRawMesh& OutRawMesh) const;
60
62
63
64#endif // #if WITH_EDITOR
65
66#if WITH_EDITORONLY_DATA
67 /*
68 * We used to maintain the UStaticMesh which owned the source model here.
69 * Now this is not necessary as we can get it from the Outer of the StaticMeshDescriptionBulkData.
70 * This means less to maintain
71 */
72 UE_DEPRECATED(5.0, "StaticMeshOwner is now deprecated.")
74
80 UPROPERTY()
82
83 // Only allow safe read of the mesh description from the game thread while a build is running (not sure about the rest. the UStaticMeshDescription stuff look particularly dangerous)
85#endif
86
87#if WITH_EDITOR
92
98
103
113
119
124
129
134
139
144
148 ENGINE_API void CommitMeshDescription(bool bUseHashAsGuid);
149
154
156#endif
157
158public:
160 UPROPERTY(EditAnywhere, Category=BuildSettings)
162
164 UPROPERTY(EditAnywhere, Category=ReductionSettings)
165 FMeshReductionSettings ReductionSettings;
166
167 UPROPERTY()
168 uint32 CacheMeshDescriptionTrianglesCount = MAX_uint32;
169
170 UPROPERTY()
171 uint32 CacheMeshDescriptionVerticesCount = MAX_uint32;
172
173 UPROPERTY()
174 float LODDistance_DEPRECATED;
175
181 UPROPERTY(EditAnywhere, Category=ReductionSettings)
183
185 UPROPERTY(VisibleAnywhere, Category = StaticMeshSourceModel, AdvancedDisplay)
186 FString SourceImportFilename;
187
188#if WITH_EDITORONLY_DATA
190 UPROPERTY()
192#endif
193
196
199
203
207
209 ENGINE_API void CreateSubObjects(UStaticMesh* Owner);
210
211#if WITH_EDITOR
213 void SerializeBulkData(FArchive& Ar, UObject* Owner);
214
215 void ConvertRawMesh(int32 LodIndex);
216#endif
217};
218
219
220// Make FStaticMeshSourceModel non-assignable
221template<> struct TStructOpsTypeTraits<FStaticMeshSourceModel> : public TStructOpsTypeTraitsBase2<FStaticMeshSourceModel>
222{
223 enum { WithCopy = false };
224};
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::FPlatformRecursiveMutex FCriticalSection
Definition CriticalSection.h:53
const bool
Definition NetworkReplayStreaming.h:178
#define MAX_uint32
Definition NumericLimits.h:21
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
#define USTRUCT(...)
Definition ObjectMacros.h:746
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
Definition RawMesh.h:112
RAWMESH_API void SaveRawMesh(struct FRawMesh &InMesh)
Definition RawMesh.cpp:252
RAWMESH_API void LoadRawMesh(struct FRawMesh &OutMesh)
Definition RawMesh.cpp:268
Definition UnrealString.h.inl:34
Definition MeshDescriptionBaseBulkData.h:25
Definition Object.h:95
Definition StaticMeshSourceData.h:24
Definition StaticMeshDescription.h:28
Definition StaticMesh.h:593
Definition BuildSettings.cpp:6
Definition EngineTypes.h:2708
Definition MeshDescription.h:94
Definition MeshReductionSettings.h:35
Definition PerPlatformProperties.h:304
Definition RawMesh.h:39
Definition StaticMeshSourceData.h:37
FStaticMeshSourceModel & operator=(const FStaticMeshSourceModel &)=delete
FStaticMeshSourceModel(const FStaticMeshSourceModel &)=delete
Definition ObjectPtr.h:488
Definition StructOpsTypeTraits.h:11
@ WithCopy
Definition StructOpsTypeTraits.h:17
Definition StructOpsTypeTraits.h:46