本文整理汇总了C++中FArchive::IsFilterEditorOnly方法的典型用法代码示例。如果您正苦于以下问题:C++ FArchive::IsFilterEditorOnly方法的具体用法?C++ FArchive::IsFilterEditorOnly怎么用?C++ FArchive::IsFilterEditorOnly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FArchive
的用法示例。
在下文中一共展示了FArchive::IsFilterEditorOnly方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Serialize
void UModel::Serialize( FArchive& Ar )
{
Super::Serialize( Ar );
const int32 StripVertexBufferFlag = 1;
FStripDataFlags StripFlags( Ar, GetOuter() && GetOuter()->IsA(ABrush::StaticClass()) ? StripVertexBufferFlag : FStripDataFlags::None );
Ar << Bounds;
if (Ar.IsLoading() && Ar.UE4Ver() < VER_UE4_BSP_UNDO_FIX )
{
TTransArray<FVector> OldVectors(this);
TTransArray<FVector> OldPoints(this);
TTransArray<FBspNode> OldNodes(this);
OldVectors.BulkSerialize(Ar);
OldPoints.BulkSerialize(Ar);
OldNodes.BulkSerialize(Ar);
Vectors = OldVectors;
Points = OldPoints;
Nodes = OldNodes;
}
else
{
Vectors.BulkSerialize(Ar);
Points.BulkSerialize(Ar);
Nodes.BulkSerialize(Ar);
}
if( Ar.IsLoading() )
{
for( int32 NodeIndex=0; NodeIndex<Nodes.Num(); NodeIndex++ )
{
Nodes[NodeIndex].NodeFlags &= ~(NF_IsNew|NF_IsFront|NF_IsBack);
}
}
if (Ar.IsLoading() && Ar.UE4Ver() < VER_UE4_BSP_UNDO_FIX )
{
TTransArray<FBspSurf> OldSurfs(this);
TTransArray<FVert> OldVerts(this);
Ar << OldSurfs;
OldVerts.BulkSerialize(Ar);
Surfs = OldSurfs;
Verts = OldVerts;
}
else
{
Ar << Surfs;
Verts.BulkSerialize(Ar);
}
if( Ar.IsLoading() && Ar.UE4Ver() < VER_UE4_REMOVE_ZONES_FROM_MODEL)
{
int32 NumZones;
Ar << NumSharedSides << NumZones;
FZoneProperties DummyZones[FBspNode::MAX_ZONES];
for( int32 i=0; i<NumZones; i++ )
{
Ar << DummyZones[i];
}
}
else
{
Ar << NumSharedSides;
}
#if WITH_EDITOR
bool bHasEditorOnlyData = !Ar.IsFilterEditorOnly();
if ( Ar.UE4Ver() < VER_UE4_REMOVE_UNUSED_UPOLYS_FROM_UMODEL )
{
bHasEditorOnlyData = true;
}
// if we are cooking then don't save this stuff out
if ( bHasEditorOnlyData )
{
Ar << Polys;
LeafHulls.BulkSerialize( Ar );
Leaves.BulkSerialize( Ar );
}
#else
bool bHasEditorOnlyData = !Ar.IsFilterEditorOnly();
if ( Ar.UE4Ver() < VER_UE4_REMOVE_UNUSED_UPOLYS_FROM_UMODEL )
{
bHasEditorOnlyData = true;
}
if((Ar.IsLoading() || Ar.IsSaving()) && bHasEditorOnlyData)
{
UPolys* DummyPolys = NULL;
Ar << DummyPolys;
TArray<int32> DummyLeafHulls;
DummyLeafHulls.BulkSerialize( Ar );
//.........这里部分代码省略.........