Skip to content

Commit 43b5384

Browse files
committed
Added UMorphTargetSet::Serialize()
1 parent 0b92aac commit 43b5384

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

Unreal/UnMesh3.cpp

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void FMorphTargetLODModel::Serialize3(FArchive& Ar, FMorphTargetLODModel& Lod)
9595

9696
if (Ar.Tell() < Ar.GetStopper())
9797
{
98-
appPrintf("UMorphTarget%s: dropping %d bytes\n", Name, Ar.GetStopper() - Ar.Tell());
98+
appPrintf("UMorphTarget %s: dropping %d bytes\n", Name, Ar.GetStopper() - Ar.Tell());
9999
DROP_REMAINING_DATA(Ar);
100100
}
101101

@@ -127,8 +127,25 @@ CMorphTarget* UMorphTarget::ConvertMorph()
127127
return morph;
128128
}
129129

130-
void UMorphTargetSet::PostLoad()
131-
{
130+
void UMorphTargetSet::Serialize(FArchive& Ar)
131+
{
132+
Super::Serialize(Ar);
133+
134+
if (Ar.ArVer >= 814)
135+
{
136+
TArray<uint32> RawWedgePointIndices;
137+
Ar << RawWedgePointIndices;
138+
}
139+
140+
if (Ar.Tell() < Ar.GetStopper())
141+
{
142+
appPrintf("UMorphTargetSet %s: dropping %d bytes\n", Name, Ar.GetStopper() - Ar.Tell());
143+
DROP_REMAINING_DATA(Ar);
144+
}
145+
}
146+
147+
void UMorphTargetSet::PostLoad()
148+
{
132149
guard(UMorphTargetSet::PostLoad);
133150

134151
if (BaseSkelMesh)

Unreal/UnMesh3.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class UMorphTargetSet : public UObject
9292
TArray<UMorphTarget*> Targets;
9393
USkeletalMesh3* BaseSkelMesh;
9494

95+
virtual void Serialize(FArchive& Ar);
9596
virtual void PostLoad(); // used to convert and add morphs to UE3 mesh
9697

9798
BEGIN_PROP_TABLE

umodel

0 Bytes
Binary file not shown.

umodel.exe

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)