@@ -61,7 +61,7 @@ protected ModelExportException(SerializationInfo info, StreamingContext context)
61
61
/// To do so, simply use its ExportObject and ExportObjects methods. Default export
62
62
/// options are used when exporting the objects to the FBX file.
63
63
/// </summary>
64
- public class ModelExporter : System . IDisposable
64
+ public sealed class ModelExporter : System . IDisposable
65
65
{
66
66
const string Title =
67
67
"Created by FBX Exporter from Unity Technologies" ;
@@ -883,7 +883,7 @@ bool ExportMesh (MeshInfo meshInfo, FbxNode fbxNode)
883
883
/// Export GameObject as a skinned mesh with material, bones, a skin and, a bind pose.
884
884
/// </summary>
885
885
[ SecurityPermission ( SecurityAction . LinkDemand ) ]
886
- protected bool ExportSkinnedMesh ( GameObject unityGo , FbxScene fbxScene , FbxNode fbxNode )
886
+ private bool ExportSkinnedMesh ( GameObject unityGo , FbxScene fbxScene , FbxNode fbxNode )
887
887
{
888
888
if ( ! unityGo || fbxNode == null )
889
889
{
@@ -1126,7 +1126,7 @@ boneWeights [i].weight3
1126
1126
/// <summary>
1127
1127
/// Export bind pose of mesh to skeleton
1128
1128
/// </summary>
1129
- protected bool ExportBindPose ( SkinnedMeshRenderer skinnedMesh , FbxNode fbxMeshNode ,
1129
+ private bool ExportBindPose ( SkinnedMeshRenderer skinnedMesh , FbxNode fbxMeshNode ,
1130
1130
FbxScene fbxScene , Dictionary < SkinnedMeshRenderer , Transform [ ] > skinnedMeshToBonesMap )
1131
1131
{
1132
1132
if ( fbxMeshNode == null || skinnedMeshToBonesMap == null || fbxScene == null )
@@ -1297,7 +1297,7 @@ internal bool ExportTransform (UnityEngine.Transform unityTransform, FbxNode fbx
1297
1297
/// if this game object is a model prefab then export with shared components
1298
1298
/// </summary>
1299
1299
[ SecurityPermission ( SecurityAction . LinkDemand ) ]
1300
- protected bool ExportInstance ( GameObject unityGo , FbxNode fbxNode )
1300
+ private bool ExportInstance ( GameObject unityGo , FbxNode fbxNode )
1301
1301
{
1302
1302
if ( ! unityGo || fbxNode == null )
1303
1303
{
@@ -1350,7 +1350,7 @@ protected bool ExportInstance(GameObject unityGo, FbxNode fbxNode)
1350
1350
/// <summary>
1351
1351
/// Exports camera component
1352
1352
/// </summary>
1353
- protected bool ExportCamera ( GameObject unityGO , FbxScene fbxScene , FbxNode fbxNode )
1353
+ private bool ExportCamera ( GameObject unityGO , FbxScene fbxScene , FbxNode fbxNode )
1354
1354
{
1355
1355
if ( ! unityGO || fbxScene == null || fbxNode == null )
1356
1356
{
@@ -1387,7 +1387,7 @@ protected bool ExportCamera (GameObject unityGO, FbxScene fbxScene, FbxNode fbxN
1387
1387
/// Supported types: point, spot and directional
1388
1388
/// Cookie => Gobo
1389
1389
/// </summary>
1390
- protected bool ExportLight ( GameObject unityGo , FbxScene fbxScene , FbxNode fbxNode )
1390
+ private bool ExportLight ( GameObject unityGo , FbxScene fbxScene , FbxNode fbxNode )
1391
1391
{
1392
1392
if ( ! unityGo || fbxScene == null || fbxNode == null )
1393
1393
{
@@ -1457,7 +1457,7 @@ protected bool ExportLight (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNo
1457
1457
return true ;
1458
1458
}
1459
1459
1460
- protected bool ExportCommonConstraintProperties < TUnityConstraint , TFbxConstraint > ( TUnityConstraint uniConstraint , TFbxConstraint fbxConstraint , FbxNode fbxNode )
1460
+ private bool ExportCommonConstraintProperties < TUnityConstraint , TFbxConstraint > ( TUnityConstraint uniConstraint , TFbxConstraint fbxConstraint , FbxNode fbxNode )
1461
1461
where TUnityConstraint : IConstraint where TFbxConstraint : FbxConstraint
1462
1462
{
1463
1463
fbxConstraint . Active . Set ( uniConstraint . constraintActive ) ;
@@ -1468,7 +1468,7 @@ protected bool ExportCommonConstraintProperties<TUnityConstraint,TFbxConstraint>
1468
1468
return true ;
1469
1469
}
1470
1470
1471
- protected struct ExpConstraintSource
1471
+ private struct ExpConstraintSource
1472
1472
{
1473
1473
private FbxNode m_node ;
1474
1474
public FbxNode node
@@ -1491,7 +1491,7 @@ public ExpConstraintSource(FbxNode node, float weight)
1491
1491
}
1492
1492
}
1493
1493
1494
- protected List < ExpConstraintSource > GetConstraintSources ( IConstraint unityConstraint )
1494
+ private List < ExpConstraintSource > GetConstraintSources ( IConstraint unityConstraint )
1495
1495
{
1496
1496
if ( unityConstraint == null )
1497
1497
{
@@ -1514,7 +1514,7 @@ protected List<ExpConstraintSource> GetConstraintSources(IConstraint unityConstr
1514
1514
return fbxSources ;
1515
1515
}
1516
1516
1517
- protected void AddFbxNodeToConstraintsMapping < T > ( FbxNode fbxNode , T fbxConstraint , System . Type uniConstraintType ) where T : FbxConstraint
1517
+ private void AddFbxNodeToConstraintsMapping < T > ( FbxNode fbxNode , T fbxConstraint , System . Type uniConstraintType ) where T : FbxConstraint
1518
1518
{
1519
1519
Dictionary < FbxConstraint , System . Type > constraintMapping ;
1520
1520
if ( ! MapConstrainedObjectToConstraints . TryGetValue ( fbxNode , out constraintMapping ) )
@@ -1525,7 +1525,7 @@ protected void AddFbxNodeToConstraintsMapping<T>(FbxNode fbxNode, T fbxConstrain
1525
1525
constraintMapping . Add ( fbxConstraint , uniConstraintType ) ;
1526
1526
}
1527
1527
1528
- protected bool ExportPositionConstraint ( IConstraint uniConstraint , FbxScene fbxScene , FbxNode fbxNode )
1528
+ private bool ExportPositionConstraint ( IConstraint uniConstraint , FbxScene fbxScene , FbxNode fbxNode )
1529
1529
{
1530
1530
if ( fbxNode == null )
1531
1531
{
@@ -1556,7 +1556,7 @@ protected bool ExportPositionConstraint(IConstraint uniConstraint, FbxScene fbxS
1556
1556
return true ;
1557
1557
}
1558
1558
1559
- protected bool ExportRotationConstraint ( IConstraint uniConstraint , FbxScene fbxScene , FbxNode fbxNode )
1559
+ private bool ExportRotationConstraint ( IConstraint uniConstraint , FbxScene fbxScene , FbxNode fbxNode )
1560
1560
{
1561
1561
if ( fbxNode == null )
1562
1562
{
@@ -1591,7 +1591,7 @@ protected bool ExportRotationConstraint(IConstraint uniConstraint, FbxScene fbxS
1591
1591
return true ;
1592
1592
}
1593
1593
1594
- protected bool ExportScaleConstraint ( IConstraint uniConstraint , FbxScene fbxScene , FbxNode fbxNode )
1594
+ private bool ExportScaleConstraint ( IConstraint uniConstraint , FbxScene fbxScene , FbxNode fbxNode )
1595
1595
{
1596
1596
if ( fbxNode == null )
1597
1597
{
@@ -1624,7 +1624,7 @@ protected bool ExportScaleConstraint(IConstraint uniConstraint, FbxScene fbxScen
1624
1624
return true ;
1625
1625
}
1626
1626
1627
- protected bool ExportAimConstraint ( IConstraint uniConstraint , FbxScene fbxScene , FbxNode fbxNode )
1627
+ private bool ExportAimConstraint ( IConstraint uniConstraint , FbxScene fbxScene , FbxNode fbxNode )
1628
1628
{
1629
1629
if ( fbxNode == null )
1630
1630
{
@@ -1690,7 +1690,7 @@ protected bool ExportAimConstraint(IConstraint uniConstraint, FbxScene fbxScene,
1690
1690
return true ;
1691
1691
}
1692
1692
1693
- protected bool ExportParentConstraint ( IConstraint uniConstraint , FbxScene fbxScene , FbxNode fbxNode )
1693
+ private bool ExportParentConstraint ( IConstraint uniConstraint , FbxScene fbxScene , FbxNode fbxNode )
1694
1694
{
1695
1695
if ( fbxNode == null )
1696
1696
{
@@ -1746,7 +1746,7 @@ protected bool ExportParentConstraint(IConstraint uniConstraint, FbxScene fbxSce
1746
1746
1747
1747
private delegate bool ExportConstraintDelegate ( IConstraint c , FbxScene fs , FbxNode fn ) ;
1748
1748
1749
- protected bool ExportConstraints ( GameObject unityGo , FbxScene fbxScene , FbxNode fbxNode )
1749
+ private bool ExportConstraints ( GameObject unityGo , FbxScene fbxScene , FbxNode fbxNode )
1750
1750
{
1751
1751
if ( ! unityGo )
1752
1752
{
@@ -1912,7 +1912,7 @@ internal void ExportAnimationSamples (AnimationCurve uniAnimCurve, FbxAnimCurve
1912
1912
/// <param name="constrainedNode"></param>
1913
1913
/// <param name="uniConstraintType"></param>
1914
1914
/// <returns></returns>
1915
- protected FbxConstraint GetFbxConstraint ( FbxNode constrainedNode , System . Type uniConstraintType )
1915
+ private FbxConstraint GetFbxConstraint ( FbxNode constrainedNode , System . Type uniConstraintType )
1916
1916
{
1917
1917
if ( uniConstraintType == null || ! uniConstraintType . GetInterfaces ( ) . Contains ( typeof ( IConstraint ) ) )
1918
1918
{
@@ -1939,7 +1939,7 @@ protected FbxConstraint GetFbxConstraint(FbxNode constrainedNode, System.Type un
1939
1939
return null ;
1940
1940
}
1941
1941
1942
- protected FbxProperty GetFbxProperty ( FbxNode fbxNode , string fbxPropertyName , System . Type uniPropertyType )
1942
+ private FbxProperty GetFbxProperty ( FbxNode fbxNode , string fbxPropertyName , System . Type uniPropertyType )
1943
1943
{
1944
1944
if ( fbxNode == null )
1945
1945
{
@@ -1980,7 +1980,7 @@ protected FbxProperty GetFbxProperty(FbxNode fbxNode, string fbxPropertyName, Sy
1980
1980
/// quaternion to euler and various other stuff.
1981
1981
/// </summary>
1982
1982
[ SecurityPermission ( SecurityAction . LinkDemand ) ]
1983
- protected void ExportAnimationCurve ( FbxNode fbxNode ,
1983
+ private void ExportAnimationCurve ( FbxNode fbxNode ,
1984
1984
AnimationCurve uniAnimCurve ,
1985
1985
float frameRate ,
1986
1986
string uniPropertyName ,
@@ -2080,7 +2080,7 @@ public float Convert(float value)
2080
2080
/// Export an AnimationClip as a single take
2081
2081
/// </summary>
2082
2082
[ SecurityPermission ( SecurityAction . LinkDemand ) ]
2083
- protected void ExportAnimationClip ( AnimationClip uniAnimClip , GameObject uniRoot , FbxScene fbxScene )
2083
+ private void ExportAnimationClip ( AnimationClip uniAnimClip , GameObject uniRoot , FbxScene fbxScene )
2084
2084
{
2085
2085
if ( ! uniAnimClip || ! uniRoot || fbxScene == null ) return ;
2086
2086
@@ -2476,7 +2476,7 @@ ref Dictionary<GameObject, RotationCurve> rotations
2476
2476
/// Export the Animator component on this game object
2477
2477
/// </summary>
2478
2478
[ SecurityPermission ( SecurityAction . LinkDemand ) ]
2479
- protected void ExportAnimation ( GameObject uniRoot , FbxScene fbxScene )
2479
+ private void ExportAnimation ( GameObject uniRoot , FbxScene fbxScene )
2480
2480
{
2481
2481
if ( ! uniRoot )
2482
2482
{
@@ -2531,7 +2531,7 @@ protected void ExportAnimation (GameObject uniRoot, FbxScene fbxScene)
2531
2531
/// <summary>
2532
2532
/// configures default camera for the scene
2533
2533
/// </summary>
2534
- protected void SetDefaultCamera ( FbxScene fbxScene )
2534
+ private void SetDefaultCamera ( FbxScene fbxScene )
2535
2535
{
2536
2536
if ( fbxScene == null ) { return ; }
2537
2537
@@ -3114,7 +3114,7 @@ internal static IExportData GetExportData(GameObject go, IExportOptions exportOp
3114
3114
/// This function exports the other components and animation.
3115
3115
/// </summary>
3116
3116
[ SecurityPermission ( SecurityAction . LinkDemand ) ]
3117
- protected bool ExportComponents ( FbxScene fbxScene , bool exportAnim = true )
3117
+ private bool ExportComponents ( FbxScene fbxScene , bool exportAnim = true )
3118
3118
{
3119
3119
var animationNodes = new HashSet < GameObject > ( ) ;
3120
3120
@@ -3175,7 +3175,7 @@ protected bool ExportComponents(FbxScene fbxScene, bool exportAnim = true)
3175
3175
/// </summary>
3176
3176
/// <returns><c>true</c>, if object has animation, <c>false</c> otherwise.</returns>
3177
3177
/// <param name="go">Go.</param>
3178
- protected bool GameObjectHasAnimation ( GameObject go ) {
3178
+ private bool GameObjectHasAnimation ( GameObject go ) {
3179
3179
return go != null &&
3180
3180
( go . GetComponent < Animator > ( ) ||
3181
3181
go . GetComponent < Animation > ( ) ||
@@ -4058,7 +4058,7 @@ public void Dispose ()
4058
4058
System . GC . SuppressFinalize ( this ) ;
4059
4059
}
4060
4060
4061
- protected virtual void Dispose ( bool cleanUpManaged )
4061
+ public void Dispose ( bool cleanUpManaged )
4062
4062
{
4063
4063
}
4064
4064
0 commit comments