mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-14 02:54:16 -04:00
Separate code
Delete some useless code
This commit is contained in:
@ -41,11 +41,7 @@ namespace AssetStudio {
|
||||
|
||||
private:
|
||||
HashSet<String^>^ frameNames;
|
||||
HashSet<String^>^ meshNames;
|
||||
bool EulerFilter;
|
||||
float filterPrecision;
|
||||
bool exportSkins;
|
||||
bool embedMedia;
|
||||
float boneSize;
|
||||
|
||||
IImported^ imported;
|
||||
@ -72,39 +68,11 @@ namespace AssetStudio {
|
||||
void ExportMesh(FbxNode* pFrameNode, ImportedMesh^ meshList, bool normals);
|
||||
FbxFileTexture* ExportTexture(ImportedTexture^ matTex, FbxMesh* pMesh);
|
||||
void ExportAnimations(bool EulerFilter, float filterValue, bool flatInbetween);
|
||||
void ExportKeyframedAnimation(ImportedKeyframedAnimation^ parser, FbxString& kTakeName, FbxAnimCurveFilterUnroll* EulerFilter, float filterPrecision,
|
||||
FbxPropertyT<FbxDouble3>& scale, FbxPropertyT<FbxDouble4>& rotate, FbxPropertyT<FbxDouble3>& translate, List<String^>^ pNotFound);
|
||||
void ExportSampledAnimation(ImportedSampledAnimation^ parser, FbxString& kTakeName, FbxAnimCurveFilterUnroll* EulerFilter, float filterPrecision, bool flatInbetween,
|
||||
FbxPropertyT<FbxDouble3>& scale, FbxPropertyT<FbxDouble4>& rotate, FbxPropertyT<FbxDouble3>& translate, List<String^>^ pNotFound);
|
||||
void ExportKeyframedAnimation(ImportedKeyframedAnimation^ parser, FbxString& kTakeName, FbxAnimCurveFilterUnroll* EulerFilter, float filterPrecision, List<String^>^ pNotFound);
|
||||
void ExportSampledAnimation(ImportedSampledAnimation^ parser, FbxString& kTakeName, FbxAnimCurveFilterUnroll* EulerFilter, float filterPrecision, bool flatInbetween, List<String^>^ pNotFound);
|
||||
void ExportMorphs(IImported^ imported, bool morphMask, bool flatInbetween);
|
||||
};
|
||||
|
||||
private:
|
||||
ref class InterpolationHelper
|
||||
{
|
||||
private:
|
||||
FbxScene * pScene;
|
||||
FbxAnimLayer* pAnimLayer;
|
||||
FbxAnimEvaluator* pAnimEvaluator;
|
||||
|
||||
FbxAnimCurveDef::EInterpolationType interpolationMethod;
|
||||
FbxAnimCurveFilterUnroll* lFilter;
|
||||
float filterPrecision;
|
||||
|
||||
FbxPropertyT<FbxDouble3>* scale, *translate;
|
||||
FbxPropertyT<FbxDouble4>* rotate;
|
||||
FbxAnimCurve* pScaleCurveX, *pScaleCurveY, *pScaleCurveZ,
|
||||
*pRotateCurveX, *pRotateCurveY, *pRotateCurveZ, *pRotateCurveW,
|
||||
*pTranslateCurveX, *pTranslateCurveY, *pTranslateCurveZ;
|
||||
|
||||
array<FbxAnimCurve*>^ allCurves;
|
||||
|
||||
public:
|
||||
static const char* pScaleName = "Scale";
|
||||
static const char* pRotateName = "Rotate";
|
||||
static const char* pTranslateName = "Translate";
|
||||
};
|
||||
|
||||
static char* StringToCharArray(String^ s);
|
||||
static void Init(FbxManager** pSdkManager, FbxScene** pScene);
|
||||
};
|
||||
|
@ -21,14 +21,6 @@ namespace AssetStudio
|
||||
}
|
||||
if (pTextures != NULL)
|
||||
{
|
||||
if (embedMedia)
|
||||
{
|
||||
for (int i = 0; i < pTextures->GetCount(); i++)
|
||||
{
|
||||
FbxFileTexture* tex = pTextures->GetAt(i);
|
||||
File::Delete(gcnew String(tex->GetFileName()));
|
||||
}
|
||||
}
|
||||
delete pTextures;
|
||||
}
|
||||
if (pExporter != NULL)
|
||||
|
@ -675,10 +675,6 @@ namespace AssetStudio
|
||||
|
||||
List<String^>^ pNotFound = gcnew List<String^>();
|
||||
|
||||
FbxPropertyT<FbxDouble3> scale = FbxProperty::Create(pScene, FbxDouble3DT, InterpolationHelper::pScaleName);
|
||||
FbxPropertyT<FbxDouble4> rotate = FbxProperty::Create(pScene, FbxDouble4DT, InterpolationHelper::pRotateName);
|
||||
FbxPropertyT<FbxDouble3> translate = FbxProperty::Create(pScene, FbxDouble3DT, InterpolationHelper::pTranslateName);
|
||||
|
||||
FbxAnimCurveFilterUnroll* lFilter = EulerFilter ? new FbxAnimCurveFilterUnroll() : NULL;
|
||||
|
||||
for (int i = 0; i < importedAnimationList->Count; i++)
|
||||
@ -702,12 +698,12 @@ namespace AssetStudio
|
||||
if (keyframed)
|
||||
{
|
||||
ImportedKeyframedAnimation^ parser = (ImportedKeyframedAnimation^)importedAnimation;
|
||||
ExportKeyframedAnimation(parser, kTakeName, lFilter, filterPrecision, scale, rotate, translate, pNotFound);
|
||||
ExportKeyframedAnimation(parser, kTakeName, lFilter, filterPrecision, pNotFound);
|
||||
}
|
||||
else
|
||||
{
|
||||
ImportedSampledAnimation^ parser = (ImportedSampledAnimation^)importedAnimation;
|
||||
ExportSampledAnimation(parser, kTakeName, lFilter, filterPrecision, flatInbetween, scale, rotate, translate, pNotFound);
|
||||
ExportSampledAnimation(parser, kTakeName, lFilter, filterPrecision, flatInbetween, pNotFound);
|
||||
}
|
||||
}
|
||||
|
||||
@ -722,8 +718,7 @@ namespace AssetStudio
|
||||
}*/
|
||||
}
|
||||
|
||||
void Fbx::Exporter::ExportKeyframedAnimation(ImportedKeyframedAnimation^ parser, FbxString& kTakeName, FbxAnimCurveFilterUnroll* EulerFilter, float filterPrecision,
|
||||
FbxPropertyT<FbxDouble3>& scale, FbxPropertyT<FbxDouble4>& rotate, FbxPropertyT<FbxDouble3>& translate, List<String^>^ pNotFound)
|
||||
void Fbx::Exporter::ExportKeyframedAnimation(ImportedKeyframedAnimation^ parser, FbxString& kTakeName, FbxAnimCurveFilterUnroll* EulerFilter, float filterPrecision, List<String^>^ pNotFound)
|
||||
{
|
||||
List<ImportedAnimationKeyframedTrack^>^ pAnimationList = parser->TrackList;
|
||||
|
||||
@ -834,8 +829,7 @@ namespace AssetStudio
|
||||
}
|
||||
}
|
||||
|
||||
void Fbx::Exporter::ExportSampledAnimation(ImportedSampledAnimation^ parser, FbxString& kTakeName, FbxAnimCurveFilterUnroll* EulerFilter, float filterPrecision, bool flatInbetween,
|
||||
FbxPropertyT<FbxDouble3>& scale, FbxPropertyT<FbxDouble4>& rotate, FbxPropertyT<FbxDouble3>& translate, List<String^>^ pNotFound)
|
||||
void Fbx::Exporter::ExportSampledAnimation(ImportedSampledAnimation^ parser, FbxString& kTakeName, FbxAnimCurveFilterUnroll* EulerFilter, float filterPrecision, bool flatInbetween, List<String^>^ pNotFound)
|
||||
{
|
||||
List<ImportedAnimationSampledTrack^>^ pAnimationList = parser->TrackList;
|
||||
|
||||
|
Reference in New Issue
Block a user