Skip to content

Commit b68c804

Browse files
committed
add comments to functions
1 parent abe07f8 commit b68c804

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Assets/FbxExporters/Editor/FbxPropertyChannelPair.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ private static UnityPropertyChannelPair GetUnityPropertyChannelPair(string fullP
169169
return new UnityPropertyChannelPair(property, channel);
170170
}
171171

172+
/// <summary>
173+
/// Get the Fbx property name for the given Unity property name from the given dictionary.
174+
/// </summary>
175+
/// <param name="uniProperty"></param>
176+
/// <param name="propertyMap"></param>
177+
/// <returns>The Fbx property name or null if there was no match in the dictionary</returns>
172178
private static string GetFbxProperty(string uniProperty, Dictionary<string, string> propertyMap)
173179
{
174180
string fbxProperty;
@@ -178,6 +184,16 @@ private static string GetFbxProperty(string uniProperty, Dictionary<string, stri
178184
return fbxProperty;
179185
}
180186

187+
/// <summary>
188+
/// Get the Fbx property name for the given Unity constraint source property name from the given dictionary.
189+
///
190+
/// This is different from GetFbxProperty() because the Unity constraint source properties contain indices, and
191+
/// the Fbx constraint source property contains the name of the source object.
192+
/// </summary>
193+
/// <param name="uniProperty"></param>
194+
/// <param name="constraint"></param>
195+
/// <param name="propertyMap"></param>
196+
/// <returns>The Fbx property name or null if there was no match in the dictionary</returns>
181197
private static string GetFbxConstraintSourceProperty(string uniProperty, FbxConstraint constraint, Dictionary<string, string> propertyMap)
182198
{
183199
foreach (var prop in propertyMap)
@@ -198,6 +214,12 @@ private static string GetFbxConstraintSourceProperty(string uniProperty, FbxCons
198214
return null;
199215
}
200216

217+
/// <summary>
218+
/// Get the Fbx channel name for the given Unity channel from the given dictionary.
219+
/// </summary>
220+
/// <param name="uniChannel"></param>
221+
/// <param name="channelMap"></param>
222+
/// <returns>The Fbx channel name or null if there was no match in the dictionary</returns>
201223
private static string GetFbxChannel(string uniChannel, Dictionary<string, string> channelMap)
202224
{
203225
string fbxChannel;
@@ -208,6 +230,13 @@ private static string GetFbxChannel(string uniChannel, Dictionary<string, string
208230
return fbxChannel;
209231
}
210232

233+
/// <summary>
234+
/// Try to get the property channel pairs for the given Unity property from the given property channel mapping.
235+
/// </summary>
236+
/// <param name="uniPropertyName"></param>
237+
/// <param name="propertyChannelMap"></param>
238+
/// <param name="constraint"></param>
239+
/// <returns>The property channel pairs or null if there was no match</returns>
211240
private static FbxPropertyChannelPair[] GetChannelPairs(string uniPropertyName, PropertyChannelMap propertyChannelMap, FbxConstraint constraint = null)
212241
{
213242
// Unity property name is of the format "property.channel" or "property". Handle both cases.

0 commit comments

Comments
 (0)