@@ -568,10 +568,10 @@ public void ExportMesh (Mesh mesh, FbxNode fbxNode, Material[] materials = null)
568
568
/// <summary>
569
569
/// Exports a unity mesh and attaches it to the node as an FbxMesh.
570
570
/// </summary>
571
- void ExportMesh ( MeshInfo meshInfo , FbxNode fbxNode )
571
+ bool ExportMesh ( MeshInfo meshInfo , FbxNode fbxNode )
572
572
{
573
573
if ( ! meshInfo . IsValid ) {
574
- return ;
574
+ return false ;
575
575
}
576
576
577
577
NumMeshes ++ ;
@@ -661,6 +661,7 @@ void ExportMesh (MeshInfo meshInfo, FbxNode fbxNode)
661
661
// set the fbxNode containing the mesh
662
662
fbxNode . SetNodeAttribute ( fbxMesh ) ;
663
663
fbxNode . SetShadingMode ( FbxNode . EShadingMode . eWireFrame ) ;
664
+ return true ;
664
665
}
665
666
666
667
/// <summary>
@@ -1611,12 +1612,12 @@ public static void UnRegisterMeshCallback(GetMeshForObject callback)
1611
1612
/// This goes through the callback system to find the right mesh and
1612
1613
/// allow plugins to substitute their own meshes.
1613
1614
/// </summary>
1614
- void ExportMesh ( GameObject gameObject , FbxNode fbxNode )
1615
+ bool ExportMesh ( GameObject gameObject , FbxNode fbxNode )
1615
1616
{
1616
1617
// First allow the object-based callbacks to have a hack at it.
1617
1618
foreach ( var callback in MeshForObjectCallbacks ) {
1618
1619
if ( callback ( this , gameObject , fbxNode ) ) {
1619
- return ;
1620
+ return true ;
1620
1621
}
1621
1622
}
1622
1623
@@ -1650,7 +1651,7 @@ void ExportMesh (GameObject gameObject, FbxNode fbxNode)
1650
1651
GetMeshForComponent callback ;
1651
1652
if ( MeshForComponentCallbacks . TryGetValue ( componentType , out callback ) ) {
1652
1653
if ( callback ( this , monoBehaviour , fbxNode ) ) {
1653
- return ;
1654
+ return true ;
1654
1655
}
1655
1656
}
1656
1657
componentType = componentType . BaseType ;
@@ -1664,15 +1665,16 @@ void ExportMesh (GameObject gameObject, FbxNode fbxNode)
1664
1665
if ( meshFilter ) {
1665
1666
var renderer = gameObject . GetComponent < Renderer > ( ) ;
1666
1667
var materials = renderer ? renderer . sharedMaterials : null ;
1667
- ExportMesh ( new MeshInfo ( meshFilter . sharedMesh , materials ) , fbxNode ) ;
1668
+ return ExportMesh ( new MeshInfo ( meshFilter . sharedMesh , materials ) , fbxNode ) ;
1668
1669
} else {
1669
1670
var smr = defaultComponent as SkinnedMeshRenderer ;
1670
1671
if ( smr ) {
1671
1672
var mesh = new Mesh ( ) ;
1672
1673
smr . BakeMesh ( mesh ) ;
1673
1674
var materials = smr . sharedMaterials ;
1674
- ExportMesh ( new MeshInfo ( mesh , materials ) , fbxNode ) ;
1675
+ bool result = ExportMesh ( new MeshInfo ( mesh , materials ) , fbxNode ) ;
1675
1676
Object . DestroyImmediate ( mesh ) ;
1677
+ return result ;
1676
1678
}
1677
1679
}
1678
1680
}
0 commit comments