This commit is contained in:
Perfare
2018-09-13 20:52:17 +08:00
parent a233af5b8f
commit 310c165824
11 changed files with 103 additions and 90 deletions

View File

@ -25,6 +25,15 @@ using namespace SharpDX;
} \
}
static char* FBXVersion[] =
{
FBX_2010_00_COMPATIBLE,
FBX_2011_00_COMPATIBLE,
FBX_2012_00_COMPATIBLE,
FBX_2013_00_COMPATIBLE,
FBX_2014_00_COMPATIBLE
};
namespace AssetStudio {
public ref class Fbx
@ -32,12 +41,14 @@ namespace AssetStudio {
public:
static Vector3 QuaternionToEuler(Quaternion q);
static Quaternion EulerToQuaternion(Vector3 v);
static char* StringToCharArray(String^ s);
static void Init(FbxManager** pSdkManager, FbxScene** pScene);
ref class Exporter
{
public:
static void Export(String^ path, IImported^ imported, bool EulerFilter, float filterPrecision, bool allFrames, bool allBones, bool skins, float boneSize, bool flatInbetween, bool compatibility);
static void ExportMorph(String^ path, IImported^ imported, bool morphMask, bool flatInbetween, bool skins, float boneSize, bool compatibility);
static void Export(String^ path, IImported^ imported, bool EulerFilter, float filterPrecision, bool allFrames, bool allBones, bool skins, float boneSize, bool flatInbetween, int versionIndex);
static void ExportMorph(String^ path, IImported^ imported, bool morphMask, bool flatInbetween, bool skins, float boneSize, int versionIndex);
private:
HashSet<String^>^ frameNames;
@ -54,11 +65,11 @@ namespace AssetStudio {
FbxArray<FbxFileTexture*>* pTextures;
FbxArray<FbxNode*>* pMeshNodes;
Exporter(String^ path, IImported^ imported, bool allFrames, bool allBones, bool skins, float boneSize, int versionIndex, bool normals);
~Exporter();
void Fbx::Exporter::LinkTexture(ImportedMaterial^ mat, int attIndex, FbxFileTexture* pTexture, FbxProperty& prop);
void SetJointsNode(FbxNode* pNode, HashSet<String^>^ boneNames, bool allBones);
Exporter(String^ path, IImported^ imported, bool allFrames, bool allBones, bool skins, float boneSize, bool compatibility, bool normals);
void Exporter::LinkTexture(ImportedMaterial^ mat, int attIndex, FbxFileTexture* pTexture, FbxProperty& prop);
void SetJointsNode(FbxNode* pNode, HashSet<String^>^ boneNames, bool allBones);
HashSet<String^>^ SearchHierarchy();
void SearchHierarchy(ImportedFrame^ frame, HashSet<String^>^ exportFrames);
void SetJointsFromImportedMeshes(bool allBones);
@ -69,8 +80,5 @@ namespace AssetStudio {
void ExportKeyframedAnimation(ImportedKeyframedAnimation^ parser, FbxString& kTakeName, FbxAnimCurveFilterUnroll* EulerFilter, float filterPrecision, bool flatInbetween);
void ExportMorphs(IImported^ imported, bool morphMask, bool flatInbetween);
};
static char* StringToCharArray(String^ s);
static void Init(FbxManager** pSdkManager, FbxScene** pScene);
};
}