本文整理汇总了C++中unfbx::FFbxImporter::GetFbxMeshCount方法的典型用法代码示例。如果您正苦于以下问题:C++ FFbxImporter::GetFbxMeshCount方法的具体用法?C++ FFbxImporter::GetFbxMeshCount怎么用?C++ FFbxImporter::GetFbxMeshCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unfbx::FFbxImporter
的用法示例。
在下文中一共展示了FFbxImporter::GetFbxMeshCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Logger
//.........这里部分代码省略.........
{
Warn->Log( errorMessage );
}
FbxNode* RootNodeToImport = NULL;
RootNodeToImport = FbxImporter->Scene->GetRootNode();
// For animation and static mesh we assume there is at lease one interesting node by default
int32 InterestingNodeCount = 1;
TArray< TArray<FbxNode*>* > SkelMeshArray;
bool bImportStaticMeshLODs = ImportUI->StaticMeshImportData->bImportMeshLODs;
bool bCombineMeshes = ImportUI->bCombineMeshes;
if ( ImportUI->MeshTypeToImport == FBXIT_SkeletalMesh )
{
FbxImporter->FillFbxSkelMeshArrayInScene(RootNodeToImport, SkelMeshArray, false);
InterestingNodeCount = SkelMeshArray.Num();
}
else if( ImportUI->MeshTypeToImport == FBXIT_StaticMesh )
{
FbxImporter->ApplyTransformSettingsToFbxNode(RootNodeToImport, ImportUI->StaticMeshImportData);
if( bCombineMeshes && !bImportStaticMeshLODs )
{
// If Combine meshes and dont import mesh LODs, the interesting node count should be 1 so all the meshes are grouped together into one static mesh
InterestingNodeCount = 1;
}
else
{
// count meshes in lod groups if we dont care about importing LODs
bool bCountLODGroupMeshes = !bImportStaticMeshLODs;
int32 NumLODGroups = 0;
InterestingNodeCount = FbxImporter->GetFbxMeshCount(RootNodeToImport,bCountLODGroupMeshes,NumLODGroups);
// if there were LODs in the file, do not combine meshes even if requested
if( bImportStaticMeshLODs && bCombineMeshes )
{
bCombineMeshes = NumLODGroups == 0;
}
}
}
if (InterestingNodeCount > 1)
{
// the option only works when there are only one asset
ImportOptions->bUsedAsFullName = false;
}
const FString Filename( UFactory::CurrentFilename );
if (RootNodeToImport && InterestingNodeCount > 0)
{
int32 NodeIndex = 0;
int32 ImportedMeshCount = 0;
UStaticMesh* NewStaticMesh = NULL;
if ( ImportUI->MeshTypeToImport == FBXIT_StaticMesh ) // static mesh
{
if (bCombineMeshes)
{
TArray<FbxNode*> FbxMeshArray;
FbxImporter->FillFbxMeshArray(RootNodeToImport, FbxMeshArray, FbxImporter);
if (FbxMeshArray.Num() > 0)
{
NewStaticMesh = FbxImporter->ImportStaticMeshAsSingle(InParent, FbxMeshArray, Name, Flags, ImportUI->StaticMeshImportData, NULL, 0);