Skip to content

Commit 7a47bcc

Browse files
author
David Lassonde
committed
Changes protected methods to private
1 parent 4c0b963 commit 7a47bcc

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

Packages/com.unity.formats.fbx/Editor/Scripts/FbxExporter.cs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected ModelExportException(SerializationInfo info, StreamingContext context)
6161
/// To do so, simply use its ExportObject and ExportObjects methods. Default export
6262
/// options are used when exporting the objects to the FBX file.
6363
/// </summary>
64-
public class ModelExporter : System.IDisposable
64+
public sealed class ModelExporter : System.IDisposable
6565
{
6666
const string Title =
6767
"Created by FBX Exporter from Unity Technologies";
@@ -883,7 +883,7 @@ bool ExportMesh (MeshInfo meshInfo, FbxNode fbxNode)
883883
/// Export GameObject as a skinned mesh with material, bones, a skin and, a bind pose.
884884
/// </summary>
885885
[SecurityPermission(SecurityAction.LinkDemand)]
886-
protected bool ExportSkinnedMesh (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNode)
886+
private bool ExportSkinnedMesh (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNode)
887887
{
888888
if(!unityGo || fbxNode == null)
889889
{
@@ -1126,7 +1126,7 @@ boneWeights [i].weight3
11261126
/// <summary>
11271127
/// Export bind pose of mesh to skeleton
11281128
/// </summary>
1129-
protected bool ExportBindPose (SkinnedMeshRenderer skinnedMesh, FbxNode fbxMeshNode,
1129+
private bool ExportBindPose (SkinnedMeshRenderer skinnedMesh, FbxNode fbxMeshNode,
11301130
FbxScene fbxScene, Dictionary<SkinnedMeshRenderer, Transform[]> skinnedMeshToBonesMap)
11311131
{
11321132
if (fbxMeshNode == null || skinnedMeshToBonesMap == null || fbxScene == null)
@@ -1297,7 +1297,7 @@ internal bool ExportTransform (UnityEngine.Transform unityTransform, FbxNode fbx
12971297
/// if this game object is a model prefab then export with shared components
12981298
/// </summary>
12991299
[SecurityPermission(SecurityAction.LinkDemand)]
1300-
protected bool ExportInstance(GameObject unityGo, FbxNode fbxNode)
1300+
private bool ExportInstance(GameObject unityGo, FbxNode fbxNode)
13011301
{
13021302
if (!unityGo || fbxNode == null)
13031303
{
@@ -1350,7 +1350,7 @@ protected bool ExportInstance(GameObject unityGo, FbxNode fbxNode)
13501350
/// <summary>
13511351
/// Exports camera component
13521352
/// </summary>
1353-
protected bool ExportCamera (GameObject unityGO, FbxScene fbxScene, FbxNode fbxNode)
1353+
private bool ExportCamera (GameObject unityGO, FbxScene fbxScene, FbxNode fbxNode)
13541354
{
13551355
if (!unityGO || fbxScene == null || fbxNode == null)
13561356
{
@@ -1387,7 +1387,7 @@ protected bool ExportCamera (GameObject unityGO, FbxScene fbxScene, FbxNode fbxN
13871387
/// Supported types: point, spot and directional
13881388
/// Cookie => Gobo
13891389
/// </summary>
1390-
protected bool ExportLight (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNode)
1390+
private bool ExportLight (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNode)
13911391
{
13921392
if(!unityGo || fbxScene == null || fbxNode == null)
13931393
{
@@ -1457,7 +1457,7 @@ protected bool ExportLight (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNo
14571457
return true;
14581458
}
14591459

1460-
protected bool ExportCommonConstraintProperties<TUnityConstraint,TFbxConstraint>(TUnityConstraint uniConstraint, TFbxConstraint fbxConstraint, FbxNode fbxNode)
1460+
private bool ExportCommonConstraintProperties<TUnityConstraint,TFbxConstraint>(TUnityConstraint uniConstraint, TFbxConstraint fbxConstraint, FbxNode fbxNode)
14611461
where TUnityConstraint : IConstraint where TFbxConstraint : FbxConstraint
14621462
{
14631463
fbxConstraint.Active.Set(uniConstraint.constraintActive);
@@ -1468,7 +1468,7 @@ protected bool ExportCommonConstraintProperties<TUnityConstraint,TFbxConstraint>
14681468
return true;
14691469
}
14701470

1471-
protected struct ExpConstraintSource
1471+
private struct ExpConstraintSource
14721472
{
14731473
private FbxNode m_node;
14741474
public FbxNode node
@@ -1491,7 +1491,7 @@ public ExpConstraintSource(FbxNode node, float weight)
14911491
}
14921492
}
14931493

1494-
protected List<ExpConstraintSource> GetConstraintSources(IConstraint unityConstraint)
1494+
private List<ExpConstraintSource> GetConstraintSources(IConstraint unityConstraint)
14951495
{
14961496
if(unityConstraint == null)
14971497
{
@@ -1514,7 +1514,7 @@ protected List<ExpConstraintSource> GetConstraintSources(IConstraint unityConstr
15141514
return fbxSources;
15151515
}
15161516

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
15181518
{
15191519
Dictionary<FbxConstraint, System.Type> constraintMapping;
15201520
if (!MapConstrainedObjectToConstraints.TryGetValue(fbxNode, out constraintMapping))
@@ -1525,7 +1525,7 @@ protected void AddFbxNodeToConstraintsMapping<T>(FbxNode fbxNode, T fbxConstrain
15251525
constraintMapping.Add(fbxConstraint, uniConstraintType);
15261526
}
15271527

1528-
protected bool ExportPositionConstraint(IConstraint uniConstraint, FbxScene fbxScene, FbxNode fbxNode)
1528+
private bool ExportPositionConstraint(IConstraint uniConstraint, FbxScene fbxScene, FbxNode fbxNode)
15291529
{
15301530
if(fbxNode == null)
15311531
{
@@ -1556,7 +1556,7 @@ protected bool ExportPositionConstraint(IConstraint uniConstraint, FbxScene fbxS
15561556
return true;
15571557
}
15581558

1559-
protected bool ExportRotationConstraint(IConstraint uniConstraint, FbxScene fbxScene, FbxNode fbxNode)
1559+
private bool ExportRotationConstraint(IConstraint uniConstraint, FbxScene fbxScene, FbxNode fbxNode)
15601560
{
15611561
if(fbxNode == null)
15621562
{
@@ -1591,7 +1591,7 @@ protected bool ExportRotationConstraint(IConstraint uniConstraint, FbxScene fbxS
15911591
return true;
15921592
}
15931593

1594-
protected bool ExportScaleConstraint(IConstraint uniConstraint, FbxScene fbxScene, FbxNode fbxNode)
1594+
private bool ExportScaleConstraint(IConstraint uniConstraint, FbxScene fbxScene, FbxNode fbxNode)
15951595
{
15961596
if(fbxNode == null)
15971597
{
@@ -1624,7 +1624,7 @@ protected bool ExportScaleConstraint(IConstraint uniConstraint, FbxScene fbxScen
16241624
return true;
16251625
}
16261626

1627-
protected bool ExportAimConstraint(IConstraint uniConstraint, FbxScene fbxScene, FbxNode fbxNode)
1627+
private bool ExportAimConstraint(IConstraint uniConstraint, FbxScene fbxScene, FbxNode fbxNode)
16281628
{
16291629
if(fbxNode == null)
16301630
{
@@ -1690,7 +1690,7 @@ protected bool ExportAimConstraint(IConstraint uniConstraint, FbxScene fbxScene,
16901690
return true;
16911691
}
16921692

1693-
protected bool ExportParentConstraint(IConstraint uniConstraint, FbxScene fbxScene, FbxNode fbxNode)
1693+
private bool ExportParentConstraint(IConstraint uniConstraint, FbxScene fbxScene, FbxNode fbxNode)
16941694
{
16951695
if(fbxNode == null)
16961696
{
@@ -1746,7 +1746,7 @@ protected bool ExportParentConstraint(IConstraint uniConstraint, FbxScene fbxSce
17461746

17471747
private delegate bool ExportConstraintDelegate(IConstraint c , FbxScene fs, FbxNode fn);
17481748

1749-
protected bool ExportConstraints (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNode)
1749+
private bool ExportConstraints (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNode)
17501750
{
17511751
if (!unityGo)
17521752
{
@@ -1912,7 +1912,7 @@ internal void ExportAnimationSamples (AnimationCurve uniAnimCurve, FbxAnimCurve
19121912
/// <param name="constrainedNode"></param>
19131913
/// <param name="uniConstraintType"></param>
19141914
/// <returns></returns>
1915-
protected FbxConstraint GetFbxConstraint(FbxNode constrainedNode, System.Type uniConstraintType)
1915+
private FbxConstraint GetFbxConstraint(FbxNode constrainedNode, System.Type uniConstraintType)
19161916
{
19171917
if (uniConstraintType == null || !uniConstraintType.GetInterfaces().Contains(typeof(IConstraint)))
19181918
{
@@ -1939,7 +1939,7 @@ protected FbxConstraint GetFbxConstraint(FbxNode constrainedNode, System.Type un
19391939
return null;
19401940
}
19411941

1942-
protected FbxProperty GetFbxProperty(FbxNode fbxNode, string fbxPropertyName, System.Type uniPropertyType)
1942+
private FbxProperty GetFbxProperty(FbxNode fbxNode, string fbxPropertyName, System.Type uniPropertyType)
19431943
{
19441944
if(fbxNode == null)
19451945
{
@@ -1980,7 +1980,7 @@ protected FbxProperty GetFbxProperty(FbxNode fbxNode, string fbxPropertyName, Sy
19801980
/// quaternion to euler and various other stuff.
19811981
/// </summary>
19821982
[SecurityPermission(SecurityAction.LinkDemand)]
1983-
protected void ExportAnimationCurve (FbxNode fbxNode,
1983+
private void ExportAnimationCurve (FbxNode fbxNode,
19841984
AnimationCurve uniAnimCurve,
19851985
float frameRate,
19861986
string uniPropertyName,
@@ -2080,7 +2080,7 @@ public float Convert(float value)
20802080
/// Export an AnimationClip as a single take
20812081
/// </summary>
20822082
[SecurityPermission(SecurityAction.LinkDemand)]
2083-
protected void ExportAnimationClip (AnimationClip uniAnimClip, GameObject uniRoot, FbxScene fbxScene)
2083+
private void ExportAnimationClip (AnimationClip uniAnimClip, GameObject uniRoot, FbxScene fbxScene)
20842084
{
20852085
if (!uniAnimClip || !uniRoot || fbxScene == null) return;
20862086

@@ -2476,7 +2476,7 @@ ref Dictionary<GameObject, RotationCurve> rotations
24762476
/// Export the Animator component on this game object
24772477
/// </summary>
24782478
[SecurityPermission(SecurityAction.LinkDemand)]
2479-
protected void ExportAnimation (GameObject uniRoot, FbxScene fbxScene)
2479+
private void ExportAnimation (GameObject uniRoot, FbxScene fbxScene)
24802480
{
24812481
if (!uniRoot)
24822482
{
@@ -2531,7 +2531,7 @@ protected void ExportAnimation (GameObject uniRoot, FbxScene fbxScene)
25312531
/// <summary>
25322532
/// configures default camera for the scene
25332533
/// </summary>
2534-
protected void SetDefaultCamera (FbxScene fbxScene)
2534+
private void SetDefaultCamera (FbxScene fbxScene)
25352535
{
25362536
if(fbxScene == null) { return; }
25372537

@@ -3114,7 +3114,7 @@ internal static IExportData GetExportData(GameObject go, IExportOptions exportOp
31143114
/// This function exports the other components and animation.
31153115
/// </summary>
31163116
[SecurityPermission(SecurityAction.LinkDemand)]
3117-
protected bool ExportComponents(FbxScene fbxScene, bool exportAnim = true)
3117+
private bool ExportComponents(FbxScene fbxScene, bool exportAnim = true)
31183118
{
31193119
var animationNodes = new HashSet<GameObject> ();
31203120

@@ -3175,7 +3175,7 @@ protected bool ExportComponents(FbxScene fbxScene, bool exportAnim = true)
31753175
/// </summary>
31763176
/// <returns><c>true</c>, if object has animation, <c>false</c> otherwise.</returns>
31773177
/// <param name="go">Go.</param>
3178-
protected bool GameObjectHasAnimation(GameObject go){
3178+
private bool GameObjectHasAnimation(GameObject go){
31793179
return go != null &&
31803180
(go.GetComponent<Animator> () ||
31813181
go.GetComponent<Animation> () ||
@@ -4058,7 +4058,7 @@ public void Dispose ()
40584058
System.GC.SuppressFinalize(this);
40594059
}
40604060

4061-
protected virtual void Dispose(bool cleanUpManaged)
4061+
public void Dispose(bool cleanUpManaged)
40624062
{
40634063
}
40644064

0 commit comments

Comments
 (0)