Community
void MayaExt_ExportTranslated(FbxObject* pFbxObject, MObject& pMayaObject)
{
bool bIsGround = false;
if( pMayaObject.isNull() == false )
{
if( pMayaObject.hasFn( MFn::kDagNode ) == true )
{
const MFnDagNode fnDagNode( pMayaObject );
const std::string nodeName = fnDagNode.name().asChar();
bIsGround = nodeName.find( "Ground" ) != std::string::npos;
}
}
if( bIsGround )
{
const FbxDataType dataType = FbxDataType::Create( "KString", eFbxString );
assert( dataType.Valid() == true );
FbxProperty prop = FbxProperty::Create( pFbxObject, dataType, "IsGround" );
assert( prop.IsValid() == true );
prop.Set( true );
}
}
void MayaExt_ExportTranslated(FbxObject* pFbxObject, MObject& pMayaObject)
{
const bool bIsNode = pFbxObject->Is< FbxNode >();
}
void MayaExt_ExportTranslated(FbxObject* pFbxObject, MObject& pMayaObject)
{
FbxScene* const pFbxScene = pFbxObject->GetScene();
}
For anyone looking for this in the future, I found the solution.
The correct signature for MayaExt_ExportTranslated is actually :
void MayaExt_ExportTranslated(FbxObject** pInputFbxObject, MObject& pMayaObject)
Note the double star meaning pointer to pointer, so it looks the same as the signature of MayaExt_ExportProcess.
All the documentation and samples are wrong, this worked for me and fixed the crashes I had.
Can't find what you're looking for? Ask the community or share your knowledge.