Skip to content

Commit 7506d21

Browse files
committed
Fixed mess with UE4.23/4.24 SkeletalMesh formats.
1 parent 1bdab83 commit 7506d21

File tree

6 files changed

+16
-7
lines changed

6 files changed

+16
-7
lines changed

Unreal/GameDatabase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ static const int ue4Versions[] =
930930
VER_UE4_5, VER_UE4_6, VER_UE4_7, VER_UE4_8, VER_UE4_9,
931931
VER_UE4_10, VER_UE4_11, VER_UE4_12, VER_UE4_13, VER_UE4_14,
932932
VER_UE4_15, VER_UE4_16, VER_UE4_17, VER_UE4_18, VER_UE4_19,
933-
VER_UE4_20, VER_UE4_21, VER_UE4_22, VER_UE4_23
933+
VER_UE4_20, VER_UE4_21, VER_UE4_22, VER_UE4_23, VER_UE4_24
934934
// NEW_ENGINE_VERSION
935935
};
936936

Unreal/UnCore.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ enum EGame
442442
GAME_ENGINE = 0xFFF0000 // mask for game engine
443443
};
444444

445-
#define LATEST_SUPPORTED_UE4_VERSION 23 // UE4.XX
445+
#define LATEST_SUPPORTED_UE4_VERSION 24 // UE4.XX
446446

447447
enum EPlatform
448448
{
@@ -2558,6 +2558,7 @@ enum
25582558
VER_UE4_21 = 517,
25592559
VER_UE4_22 = 517,
25602560
VER_UE4_23 = 517,
2561+
VER_UE4_24 = 517,
25612562
// look for NEW_ENGINE_VERSION over the code to find places where version constants should be inserted.
25622563
// LATEST_SUPPORTED_UE4_VERSION should be updated too.
25632564
};

Unreal/UnMesh4.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ struct FSkinWeightVertexBuffer
971971
// and there's a typo: it relies on FSkeletalMeshCustomVersion::SplitModelAndRenderData which is UE4.15 constant.
972972
// So we're using comparison with UE4.23 instead.
973973

974-
if (Ar.Game < GAME_UE4(23))
974+
if (Ar.Game < GAME_UE4(24))
975975
{
976976
Ar << bExtraBoneInfluences << NumVertices;
977977
}
@@ -1212,7 +1212,7 @@ struct FStaticLODModel4
12121212
unguard;
12131213
}
12141214

1215-
// This function is used only for UE4.19-UE4.22 data. UE4 source code prototype is
1215+
// This function is used only for UE4.19-UE4.23 data. UE4 source code prototype is
12161216
// FSkeletalMeshLODRenderData::Serialize().
12171217
static void SerializeRenderItem_Legacy(FArchive& Ar, FStaticLODModel4& Lod)
12181218
{
@@ -1305,17 +1305,23 @@ struct FStaticLODModel4
13051305
unguard;
13061306
}
13071307

1308+
if (Ar.Game >= GAME_UE4(23))
1309+
{
1310+
FSkinWeightProfilesData SkinWeightProfilesData;
1311+
Ar << SkinWeightProfilesData;
1312+
}
1313+
13081314
unguard;
13091315
}
13101316

1311-
// This function is used only for UE4.23+ data. It adds LOD streaming functionality and
1317+
// This function is used only for UE4.24+ data. It adds LOD streaming functionality and
13121318
// differs too much from previous code to try keeping code in a single function.
13131319
// UE4 source code prototype is FSkeletalMeshLODRenderData::Serialize().
13141320
static void SerializeRenderItem(FArchive& Ar, FStaticLODModel4& Lod)
13151321
{
13161322
guard(FStaticLODModel4::SerializeRenderItem);
13171323

1318-
if (Ar.Game < GAME_UE4(23))
1324+
if (Ar.Game < GAME_UE4(24))
13191325
{
13201326
// Fallback to older code when needed.
13211327
SerializeRenderItem_Legacy(Ar, Lod);
@@ -1358,7 +1364,6 @@ struct FStaticLODModel4
13581364
//todo
13591365
appError("SkeletalMesh: LOD data in bulk");
13601366
}
1361-
13621367
}
13631368

13641369
unguard;

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ detex
212212

213213
Changes
214214
~~~~~~~
215+
22.10.2019
216+
- finalized UE4.23 support, initial UE4.24 support
217+
215218
15.10.2019
216219
- loading and visualizing of UE3 and UE4 MorphTargets; switching between morphs is done with Ctrl+[ and Ctrl+]
217220
keys

umodel

0 Bytes
Binary file not shown.

umodel.exe

512 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)