vault backup: 2023-12-11 19:15:43
This commit is contained in:
parent
1d494d0bca
commit
1f74347e19
@ -102,4 +102,13 @@ void UBVHImportFactory::RecursiveReadKeysFromNode(IAnimationDataController& Cont
|
||||
|
||||
# UE5中使用FBXSDK导入动画逻辑
|
||||
- UAnimSequence * UEditorEngine::ImportFbxAnimation
|
||||
- UAnimSequence * UnFbx::FFbxImporter::ImportAnimations
|
||||
- UAnimSequence * UnFbx::FFbxImporter::ImportAnimations
|
||||
|
||||
UE5中FBXSDK相关函数调用方式:
|
||||
- bool FFbxImporter::OpenFile(FString Filename)
|
||||
- bool FFbxImporter::ImportFile(FString Filename, bool bPreventMaterialNameClash /*=false*/)
|
||||
|
||||
# 参考
|
||||
1. Interchange\\Runtime\\Source\\Parsers
|
||||
1. InterchangeFbxParser.Build.cs
|
||||
2. FbxInclude.h:FBXSDK头文件包含问题。
|
56
08-Assets/FbxInclude 1.h
Normal file
56
08-Assets/FbxInclude 1.h
Normal file
@ -0,0 +1,56 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
|
||||
// Temporarily disable a few warnings due to virtual function abuse in FBX source files
|
||||
#pragma warning( push )
|
||||
|
||||
#pragma warning( disable : 4263 ) // 'function' : member function does not override any base class virtual member function
|
||||
#pragma warning( disable : 4264 ) // 'virtual_function' : no override available for virtual member function from base 'class'; function is hidden
|
||||
|
||||
// Include the fbx sdk header
|
||||
// temp undef/redef of _O_RDONLY because kfbxcache.h (included by fbxsdk.h) does
|
||||
// a weird use of these identifiers inside an enum.
|
||||
#ifdef _O_RDONLY
|
||||
#define TMP_UNFBX_BACKUP_O_RDONLY _O_RDONLY
|
||||
#define TMP_UNFBX_BACKUP_O_WRONLY _O_WRONLY
|
||||
#undef _O_RDONLY
|
||||
#undef _O_WRONLY
|
||||
#endif
|
||||
|
||||
//Robert G. : Packing was only set for the 64bits platform, but we also need it for 32bits.
|
||||
//This was found while trying to trace a loop that iterate through all character links.
|
||||
//The memory didn't match what the debugger displayed, obviously since the packing was not right.
|
||||
#pragma pack(push,8)
|
||||
|
||||
#if PLATFORM_WINDOWS
|
||||
// _CRT_SECURE_NO_DEPRECATE is defined but is not enough to suppress the deprecation
|
||||
// warning for vsprintf and stricmp in VS2010. Since FBX is able to properly handle the non-deprecated
|
||||
// versions on the appropriate platforms, _CRT_SECURE_NO_DEPRECATE is temporarily undefined before
|
||||
// including the FBX headers
|
||||
|
||||
// The following is a hack to make the FBX header files compile correctly under Visual Studio 2012 and Visual Studio 2013
|
||||
#if _MSC_VER >= 1700
|
||||
#define FBX_DLL_MSC_VER 1600
|
||||
#endif
|
||||
|
||||
|
||||
#endif // PLATFORM_WINDOWS
|
||||
|
||||
// FBX casts null pointer to a reference
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include <fbxsdk.h>
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef TMP_UNFBX_BACKUP_O_RDONLY
|
||||
#define _O_RDONLY TMP_FBX_BACKUP_O_RDONLY
|
||||
#define _O_WRONLY TMP_FBX_BACKUP_O_WRONLY
|
||||
#undef TMP_UNFBX_BACKUP_O_RDONLY
|
||||
#undef TMP_UNFBX_BACKUP_O_WRONLY
|
||||
#endif
|
||||
|
||||
#pragma warning( pop )
|
56
08-Assets/FbxInclude.h
Normal file
56
08-Assets/FbxInclude.h
Normal file
@ -0,0 +1,56 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
|
||||
// Temporarily disable a few warnings due to virtual function abuse in FBX source files
|
||||
#pragma warning( push )
|
||||
|
||||
#pragma warning( disable : 4263 ) // 'function' : member function does not override any base class virtual member function
|
||||
#pragma warning( disable : 4264 ) // 'virtual_function' : no override available for virtual member function from base 'class'; function is hidden
|
||||
|
||||
// Include the fbx sdk header
|
||||
// temp undef/redef of _O_RDONLY because kfbxcache.h (included by fbxsdk.h) does
|
||||
// a weird use of these identifiers inside an enum.
|
||||
#ifdef _O_RDONLY
|
||||
#define TMP_UNFBX_BACKUP_O_RDONLY _O_RDONLY
|
||||
#define TMP_UNFBX_BACKUP_O_WRONLY _O_WRONLY
|
||||
#undef _O_RDONLY
|
||||
#undef _O_WRONLY
|
||||
#endif
|
||||
|
||||
//Robert G. : Packing was only set for the 64bits platform, but we also need it for 32bits.
|
||||
//This was found while trying to trace a loop that iterate through all character links.
|
||||
//The memory didn't match what the debugger displayed, obviously since the packing was not right.
|
||||
#pragma pack(push,8)
|
||||
|
||||
#if PLATFORM_WINDOWS
|
||||
// _CRT_SECURE_NO_DEPRECATE is defined but is not enough to suppress the deprecation
|
||||
// warning for vsprintf and stricmp in VS2010. Since FBX is able to properly handle the non-deprecated
|
||||
// versions on the appropriate platforms, _CRT_SECURE_NO_DEPRECATE is temporarily undefined before
|
||||
// including the FBX headers
|
||||
|
||||
// The following is a hack to make the FBX header files compile correctly under Visual Studio 2012 and Visual Studio 2013
|
||||
#if _MSC_VER >= 1700
|
||||
#define FBX_DLL_MSC_VER 1600
|
||||
#endif
|
||||
|
||||
|
||||
#endif // PLATFORM_WINDOWS
|
||||
|
||||
// FBX casts null pointer to a reference
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include <fbxsdk.h>
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef TMP_UNFBX_BACKUP_O_RDONLY
|
||||
#define _O_RDONLY TMP_FBX_BACKUP_O_RDONLY
|
||||
#define _O_WRONLY TMP_FBX_BACKUP_O_WRONLY
|
||||
#undef TMP_UNFBX_BACKUP_O_RDONLY
|
||||
#undef TMP_UNFBX_BACKUP_O_WRONLY
|
||||
#endif
|
||||
|
||||
#pragma warning( pop )
|
Loading…
x
Reference in New Issue
Block a user