private void AutoCompute()
{
if (this.m_BlendType.intValue == 0)
{
EditorGUILayout.PropertyField(this.m_UseAutomaticThresholds, EditorGUIUtility.TempContent("Automate Thresholds"), new GUILayoutOption[0]);
this.m_ShowCompute.target = !this.m_UseAutomaticThresholds.boolValue;
}
else if (this.m_BlendType.intValue == 4)
{
this.m_ShowCompute.target = false;
}
else
{
this.m_ShowCompute.target = true;
}
this.m_ShowAdjust.target = this.AllMotions();
if (EditorGUILayout.BeginFadeGroup(this.m_ShowCompute.faded))
{
Rect controlRect = EditorGUILayout.GetControlRect(new GUILayoutOption[0]);
GUIContent label = (this.ParameterCount != 1) ? EditorGUIUtility.TempContent("Compute Positions") : EditorGUIUtility.TempContent("Compute Thresholds");
controlRect = EditorGUI.PrefixLabel(controlRect, 0, label);
if (EditorGUI.ButtonMouseDown(controlRect, EditorGUIUtility.TempContent("Select"), FocusType.Passive, EditorStyles.popup))
{
GenericMenu menu = new GenericMenu();
if (this.ParameterCount == 1)
{
this.AddComputeMenuItems(menu, string.Empty, ChildPropertyToCompute.Threshold);
}
else
{
menu.AddItem(new GUIContent("Velocity XZ"), false, new GenericMenu.MenuFunction(this.ComputePositionsFromVelocity));
menu.AddItem(new GUIContent("Speed And Angular Speed"), false, new GenericMenu.MenuFunction(this.ComputePositionsFromSpeedAndAngularSpeed));
this.AddComputeMenuItems(menu, "X Position From/", ChildPropertyToCompute.PositionX);
this.AddComputeMenuItems(menu, "Y Position From/", ChildPropertyToCompute.PositionY);
}
menu.DropDown(controlRect);
}
}
EditorGUILayout.EndFadeGroup();
if (EditorGUILayout.BeginFadeGroup(this.m_ShowAdjust.faded))
{
Rect position = EditorGUI.PrefixLabel(EditorGUILayout.GetControlRect(new GUILayoutOption[0]), 0, EditorGUIUtility.TempContent("Adjust Time Scale"));
if (EditorGUI.ButtonMouseDown(position, EditorGUIUtility.TempContent("Select"), FocusType.Passive, EditorStyles.popup))
{
GenericMenu menu2 = new GenericMenu();
menu2.AddItem(new GUIContent("Homogeneous Speed"), false, new GenericMenu.MenuFunction(this.ComputeTimeScaleFromSpeed));
menu2.AddItem(new GUIContent("Reset Time Scale"), false, new GenericMenu.MenuFunction(this.ResetTimeScale));
menu2.DropDown(position);
}
}
EditorGUILayout.EndFadeGroup();
}