Skip to content

Commit 0cdee9d

Browse files
committed
Added option for disabling MorphTarget loading
Use UI or -nomorph command line switch.
1 parent 765341a commit 0cdee9d

File tree

7 files changed

+10
-0
lines changed

7 files changed

+10
-0
lines changed

UmodelTool/Main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ static void RegisterClasses(int game)
198198
}
199199
if (!GSettings.Startup.UseStaticMesh) UnregisterClass("StaticMesh", true);
200200
if (!GSettings.Startup.UseTexture) UnregisterClass("UnrealMaterial", true);
201+
if (!GSettings.Startup.UseMorphTarget) UnregisterClass("MorphTarget", false);
201202
if (!GSettings.Startup.UseLightmapTexture) UnregisterClass("LightMapTexture2D", true);
202203
if (!GSettings.Startup.UseScaleForm) UnregisterClass("SwfMovie", true);
203204
if (!GSettings.Startup.UseFaceFx)
@@ -379,6 +380,7 @@ static void PrintUsage()
379380
" -noanim disable loading of MeshAnimation classes\n"
380381
" -nostat disable loading of StaticMesh class\n"
381382
" -notex disable loading of Material classes\n"
383+
" -nomorph disable loading of MorphTarget class\n"
382384
" -nolightmap disable loading of Lightmap textures\n"
383385
" -sounds allow export of sounds\n"
384386
" -3rdparty allow 3rd party asset export (ScaleForm, FaceFX)\n"
@@ -757,6 +759,7 @@ int main(int argc, const char **argv)
757759
OPT_NBOOL("nostat", GSettings.Startup.UseStaticMesh)
758760
OPT_NBOOL("noanim", GSettings.Startup.UseAnimation)
759761
OPT_NBOOL("notex", GSettings.Startup.UseTexture)
762+
OPT_NBOOL("nomorph", GSettings.Startup.UseMorphTarget)
760763
OPT_NBOOL("nolightmap", GSettings.Startup.UseLightmapTexture)
761764
OPT_BOOL ("sounds", GSettings.Startup.UseSound)
762765
OPT_BOOL ("dds", GSettings.Export.ExportDdsTexture)

UmodelTool/StartupDialog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ void UIStartupDialog::InitUI()
9595
+ NewControl(UICheckbox, "Static mesh", &Opt.UseStaticMesh)
9696
+ NewControl(UICheckbox, "Animation", &Opt.UseAnimation)
9797
+ NewControl(UICheckbox, "Textures", &Opt.UseTexture)
98+
+ NewControl(UICheckbox, "MorphTargets", &Opt.UseMorphTarget)
9899
+ NewControl(UICheckbox, "Lightmaps", &Opt.UseLightmapTexture)
99100
]
100101
+ NewControl(UIGroup, GROUP_NO_BORDER)

UmodelTool/UmodelSettings.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ void CStartupSettings::Reset()
9999
UseAnimation = true;
100100
UseStaticMesh = true;
101101
UseTexture = true;
102+
UseMorphTarget = true;
102103
UseLightmapTexture = true;
103104

104105
UseSound = false;

UmodelTool/UmodelSettings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ struct CStartupSettings
1515
bool UseAnimation;
1616
bool UseStaticMesh;
1717
bool UseTexture;
18+
bool UseMorphTarget;
1819
bool UseLightmapTexture;
1920
bool UseSound;
2021
bool UseScaleForm;
@@ -31,6 +32,7 @@ struct CStartupSettings
3132
PROP_BOOL(UseAnimation)
3233
PROP_BOOL(UseStaticMesh)
3334
PROP_BOOL(UseTexture)
35+
PROP_BOOL(UseMorphTarget)
3436
PROP_BOOL(UseLightmapTexture)
3537
PROP_BOOL(UseSound)
3638
PROP_BOOL(UseScaleForm)

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ ooz
216216

217217
Changes
218218
~~~~~~~
219+
29.12.2019
220+
- added option to disable MorphTarget loading: available in UI and with -nomorph command line option
221+
219222
21.11.2019
220223
- added Star Wars Jedi: Fallen Order support, requires game override (-game=jedi)
221224

umodel

0 Bytes
Binary file not shown.

umodel.exe

512 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)