Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
6ad856c
Extending the animation system, primarily for UE4
gildor2 Feb 10, 2021
712bd43
Using vertex buffers for text rendering
gildor2 Feb 10, 2021
dece2f3
Optimized UMaterial3::GetParams and UMaterialInstanceConstant::GetParams
gildor2 Feb 10, 2021
cbf07fd
Some UE4 animation fixes
gildor2 Feb 10, 2021
8408e10
Adjusting UE4 retarget poses by skeleton's scale
gildor2 Feb 13, 2021
d0e1f03
Fixed compile error
gildor2 Feb 13, 2021
7985412
Pushing some UE4.26/4.27 stuff
gildor2 Feb 14, 2021
4cefe55
Updated settings files
gildor2 Feb 14, 2021
46b46c9
UE4 animation retargeting debug code
gildor2 Feb 14, 2021
50f4fe9
Changes in retargeting runtime
gildor2 Feb 14, 2021
1fd25b4
Support for negative animation playback rates
gildor2 Feb 18, 2021
ee4b4af
Fixed glTF animation issues
gildor2 Feb 19, 2021
44282b4
DrawTextAtAnchor fixes
gildor2 Feb 19, 2021
30db0c6
A bit more GLText refactoring
gildor2 Feb 19, 2021
429db24
Hyperlink text in 3D space
gildor2 Feb 19, 2021
c3bbade
Highlighting a particular bone in SkeletalMesh viewer
gildor2 Feb 19, 2021
0b90d0b
Locking the bone highlight with a mouse click on its name
gildor2 Feb 21, 2021
dc04d45
Added new UAnimSequence4 field
gildor2 Feb 21, 2021
0539464
Math: added Quat2Euler()
gildor2 Feb 21, 2021
4c74fb5
SkelMeshInstance: SHOW_ANIM refactoring
gildor2 Feb 21, 2021
891f781
Fixed bug with wrong rotation of some bones
gildor2 Feb 21, 2021
5494348
Fixed UE4.26 UTexture unversioned properties
gildor2 Feb 23, 2021
4b1d781
Fix for bone highlight logic
gildor2 Feb 26, 2021
4071df9
Reorganized UnAnim4 animation decompressor
gildor2 Feb 26, 2021
3a152ff
Fixed crash in UnAnim3.cpp when processing empty animation track
gildor2 Feb 26, 2021
c37fccb
Text color improvements
gildor2 Mar 3, 2021
d00fe7d
Minor retargeting improvements
gildor2 Mar 3, 2021
1b5f28f
Experimental (disabled): reading UE4 animation scale keys
gildor2 Mar 3, 2021
d2ec360
UnAnim4.cpp: improved DEBUG_RETARGET
gildor2 Mar 3, 2021
c84ddee
Lost code for d00fe7d48cbf971429568c7cafcb46dfa5f65fd0
gildor2 Mar 3, 2021
f5f7b13
Updated UE4 stuff
gildor2 Mar 18, 2021
edc8627
Animation debug code
gildor2 Mar 18, 2021
f17535a
Moved UMaterial serializers to cpp
gildor2 Mar 18, 2021
bedb53d
"Normalized" CVec4 and CQuat field names
gildor2 Mar 20, 2021
eaba283
Unified CVec3 and FVector field names (upper case)
gildor2 Mar 20, 2021
8208aeb
Experimental code: BAKE_BONE_SCALES
gildor2 Mar 29, 2021
f47c35c
Retargeting additions
gildor2 Mar 29, 2021
bfec68c
Updated the compatibility table
gildor2 Mar 29, 2021
eb559b4
Fixed crash when source StaticMesh refers to missing material
gildor2 Apr 2, 2021
e78e032
Introduced UObject's TypeFlags
gildor2 Apr 5, 2021
4fe798c
Added TArray methods AddZeroed_GetRef and AddUninitialized_GetRef
gildor2 Apr 6, 2021
fd75908
Added UE4 SkeletalMesh socket support
gildor2 Apr 6, 2021
3eeccf7
Moved ETypeFlags to TypeInfo.h
gildor2 Apr 6, 2021
7df06bc
Inline view of UE3/UE4 SkeletalMesh socket properties
gildor2 Apr 6, 2021
a791d74
Ignoring very large package files
gildor2 Apr 10, 2021
38cb2e7
Converted EFileArchiveOptions to enum class
gildor2 Apr 10, 2021
f6c2294
Do not crash when package can't be (re)opened
gildor2 Apr 10, 2021
488dba9
EBoneRetargetingMode::Mesh gets translation from retarget source
gildor2 Apr 15, 2021
fa98429
Correctly applying bone scale
gildor2 Apr 15, 2021
6e82b95
Made crash reporting thread-safe
gildor2 Apr 18, 2021
6d0217d
Recognizing linux 32 or 64-bit platforms in build.sh
gildor2 May 29, 2021
46aee36
Using C++2a standard for macOS/clang
gildor2 May 29, 2021
1b6f52e
Using Oodle static library whenever possible
gildor2 May 29, 2021
2f7cd0d
Mass Effect Legendary Edition support
gildor2 May 30, 2021
115d6d7
Fixes for Mass Effect Legendary Edition (for ME2 and ME3)
gildor2 Jun 2, 2021
ff21097
Win32: using -NODEFAULTLIB:libcmt only when linking with Oodle
gildor2 Jun 2, 2021
ed3e1aa
Support for more than 64k content directories
gildor2 Jun 3, 2021
9150070
Fixes for UE4.25+ editor packages
gildor2 Jun 3, 2021
9902e29
Using 32 bit int for game folder index
gildor2 Jun 5, 2021
2c79926
Fixed "Structure type ... is unknown, skipping array..." error
gildor2 Jun 5, 2021
77c0a40
UnPackage::FindExport() didn't work when className wasn't in pool
gildor2 Jun 5, 2021
96f1774
Fixed UE4.24+ UTextureCube
gildor2 Jun 8, 2021
a92c109
Updated UE4.26 UMaterialInstance properties list
gildor2 Jun 16, 2021
6238ca3
Some refactoring of CTypeInfo::FindUnversionedProp()
gildor2 Jun 19, 2021
e879659
A few small fixes
gildor2 Jul 1, 2021
def7ac9
Eliminated dynamic linkage with MSVCRT
gildor2 Jul 4, 2021
3416cc2
Major improvements for VSCode projects
gildor2 Jul 4, 2021
c85415d
Refactored build.sh
gildor2 Jul 4, 2021
0336bc6
Using different umodel.exe file name for different targets
gildor2 Jul 4, 2021
912d691
Improvements for custom umodel.exe file name
gildor2 Jul 5, 2021
8bebb68
Building and packaging Win32 and Win64 builds of UModel
gildor2 Jul 5, 2021
18f3ec7
UE4: added possibility to specify game-specific unversioned properties
gildor2 Jul 13, 2021
65ffb58
UE4 pak file with zero-length file did hide another file
gildor2 Jul 20, 2021
90ac5bd
build.sh: fixed git revision request
gildor2 Jul 29, 2021
10fdbca
Fixes for Transformers: Fall of Cybertron
gildor2 Aug 7, 2021
d73e1db
Improved fix for Transformers: Fall of Cybertron animation
gildor2 Aug 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Project sponsorship links

patreon: UGildor
custom: https://www.gildor.org/en/donate
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ umodel.cfg
!.vs/tasks.vs.json

# Executable files and pdb
umodel.pdb
SDL2.dll
umodel[-_]*.exe
umodel*.pdb
Tools/**/*.exe
Tools/**/*.pdb
*todo.md
Expand All @@ -41,9 +41,9 @@ Tools/**/*.pdb
Tools/UITest/vs/Debug/
Tools/UITest/vs/Release/

# ooz library
libs/oodle/*.h
libs/oodle/*.cpp
# oodle library
libs/oodle/include
libs/oodle/lib

# oodle dll
libs/oo2core*.dll
Expand Down
8 changes: 4 additions & 4 deletions .vs/CppProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"intelliSenseMode": "windows-msvc-x86",
"environments": [
{
"BuildOptions": ""
"BuildOptions": "--exe umodel.exe"
}
]
},
Expand All @@ -35,7 +35,7 @@
"intelliSenseMode": "windows-msvc-x86",
"environments": [
{
"BuildOptions": "--debug"
"BuildOptions": "--debug --exe umodel.exe"
}
]
},
Expand All @@ -54,7 +54,7 @@
"intelliSenseMode": "windows-msvc-x64",
"environments": [
{
"BuildOptions": "--64"
"BuildOptions": "--64 --exe umodel.exe"
}
]
},
Expand All @@ -74,7 +74,7 @@
"intelliSenseMode": "windows-msvc-x64",
"environments": [
{
"BuildOptions": "--64 --debug"
"BuildOptions": "--64 --debug --exe umodel.exe"
}
]
}
Expand Down
57 changes: 26 additions & 31 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}",
"${workspaceFolder}/Core",
"${workspaceFolder}/Unreal",
"${workspaceFolder}/UmodelTool",
"${workspaceFolder}/libs",
"${workspaceFolder}/libs/include",
"${workspaceFolder}/libs/includewin32",
"${workspaceFolder}/UI"
],
"defines": [
"MAX_DEBUG",
"RENDERING",
"HAS_UI"
],
"forcedInclude": [
"${workspaceFolder}/Unreal/GameDefines.h"
],
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
"name": "Win32-Release",
"customConfigurationVariables": {
"BuildOptions": "",
"ExeName": "umodel.exe"
}
},
{
"name": "Win32-Debug",
"customConfigurationVariables": {
"BuildOptions": "--debug",
"ExeName": "umodel-debug.exe"
}
},
{
"name": "Win64-Release",
"customConfigurationVariables": {
"BuildOptions": "--64",
"ExeName": "umodel_64.exe"
}
},
{
"name": "Win64-Debug",
"customConfigurationVariables": {
"BuildOptions": "--64 --debug",
"ExeName": "umodel-debug_64.exe"
}
}
],
"version": 4
Expand Down
21 changes: 14 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,21 @@
"name": "(No arguments)",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/umodel.exe",
"program": "${workspaceFolder}/${input:ExeName}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"logging": { "moduleLoad": false },
"visualizerFile": "${workspaceFolder}/Tools/umodel.natvis"
},
{
"name": "Volatile (cmdline.cfg)",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/umodel.exe",
"program": "${workspaceFolder}/${input:ExeName}",
"args": [ "@${workspaceFolder}/docs/cmdline.cfg" ],
"cwd": "${workspaceFolder}",
"externalConsole": false,
"logging": { "moduleLoad": false },
"visualizerFile": "${workspaceFolder}/Tools/umodel.natvis"
},
Expand All @@ -37,9 +35,18 @@
"program": "${workspaceFolder}/Tools/UITest/uitest.exe",
"args": [],
"cwd": "${workspaceFolder}",
"externalConsole": false,
"logging": { "moduleLoad": false },
"visualizerFile": "${workspaceFolder}/Tools/umodel.natvis"
}
]
}
],
"inputs": [
// Requesting a customConfigurationVariables from c_cpp_properties.json (undocumented, may be changed in a future_
// https://stackoverflow.com/a/62404215
{
"id": "ExeName",
"type": "command",
"command": "cpptools.activeConfigCustomVariable",
"args": "ExeName"
}
]
}
27 changes: 27 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,32 @@
"*.project": "perl"
},
"files.trimTrailingWhitespace": true,
"C_Cpp.default.includePath": [
"${workspaceFolder}",
"${workspaceFolder}/Core",
"${workspaceFolder}/Unreal",
"${workspaceFolder}/UmodelTool",
"${workspaceFolder}/libs",
"${workspaceFolder}/libs/include",
"${workspaceFolder}/libs/includewin32",
"${workspaceFolder}/UI"
],
"C_Cpp.default.defines": [
"MAX_DEBUG",
"RENDERING",
"HAS_UI"
],
"C_Cpp.default.forcedInclude": [
"${workspaceFolder}/Unreal/GameDefines.h"
],
"C_Cpp.default.cStandard": "c11",
"C_Cpp.default.cppStandard": "c++17",
"C_Cpp.default.intelliSenseMode": "msvc-x64",
"C_Cpp.default.browse.path": [
"${workspaceFolder}"
],
"C_Cpp.default.browse.limitSymbolsToIncludedHeaders": true,
"C_Cpp.default.browse.databaseFilename": "",
"cSpell.words": [
"FCOLOR",
"FGPU",
Expand All @@ -48,6 +74,7 @@
"unversioned",
"recurse",
"uv",
"retargeting",
"retarget"
]
}
20 changes: 14 additions & 6 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"label": "Build",
"type": "shell",
"command": "./build.sh --debug",
"command": "./build.sh ${input:BuildOptions}",
"group": {
"kind": "build",
"isDefault": true
Expand All @@ -21,7 +21,7 @@
{
"label": "Compile",
"type": "shell",
"command": "./build.sh --debug --file \"${relativeFile}\"",
"command": "./build.sh ${input:BuildOptions} --file \"${relativeFile}\"",
"presentation": {
"reveal": "always",
"showReuseMessage": false,
Expand Down Expand Up @@ -57,13 +57,21 @@
},
"problemMatcher": ""
}
]
],
"inputs": [
// Requesting a customConfigurationVariables from c_cpp_properties.json (undocumented, may be changed in a future_
// https://stackoverflow.com/a/62404215
{
"id": "BuildOptions",
"type": "command",
"command": "cpptools.activeConfigCustomVariable",
"args": "BuildOptions"
},
{
"id": "ue4const",
"type": "promptString",
"description": "UE4 C++ constant:",
"default": "",
"type": "promptString"
"default": ""
},
]
]
}
31 changes: 31 additions & 0 deletions Core/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ CErrorContext GError;

void appError(const char *fmt, ...)
{
#if THREADING
if (!GError.ShouldLogThisThread()) THROW;
#endif

va_list argptr;
va_start(argptr, fmt);
char buf[4096];
Expand Down Expand Up @@ -177,6 +181,10 @@ void CErrorContext::HandleError()

void CErrorContext::StandardHandler()
{
// Do not print error message twice (e.g. when StandardHandler is called from worker thread, then from main thread)
if (IsErrorLogged) return;
IsErrorLogged = true;

void (*PrintFunc)(const char*, ...);
PrintFunc = GError.SuppressLog ? appPrintf : appNotify;

Expand All @@ -195,6 +203,22 @@ void CErrorContext::StandardHandler()

#if DO_GUARD

#if THREADING

bool CErrorContext::ShouldLogThisThread()
{
int ThreadId = CThread::CurrentId();
if (ErrorThreadId == 0)
{
//todo: this operation is not thread-safe
ErrorThreadId = ThreadId;
return true;
}
return ErrorThreadId == ThreadId;
}

#endif // THREADING

void CErrorContext::LogHistory(const char *part)
{
if (!History[0])
Expand All @@ -204,6 +228,9 @@ void CErrorContext::LogHistory(const char *part)

void CErrorContext::SetPrefix(const char* prefix)
{
#if THREADING
if (!GError.ShouldLogThisThread()) return;
#endif
char buf[512];
appSprintf(ARRAY_ARG(buf), GError.FmtNeedArrow ? " <- %s: " : "%s: ", prefix);
GError.LogHistory(buf);
Expand All @@ -212,6 +239,10 @@ void CErrorContext::SetPrefix(const char* prefix)

void CErrorContext::UnwindThrow(const char *fmt, ...)
{
#if THREADING
if (!GError.ShouldLogThisThread()) THROW;
#endif

char buf[512];
va_list argptr;

Expand Down
Loading