Skip to content

Commit 23b2077

Browse files
authored
Merge pull request #338 from Unity-Technologies/Uni-40953-RemoveExportAllTimelineClipsMenu
Uni-40953-RemoveExportAllTimelineClipsMenu-Fixed
2 parents 3910430 + de22736 commit 23b2077

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3063,41 +3063,6 @@ public static void ExportSingleTimelineClip(TimelineClip timelineClipSelected, G
30633063
ExportModelEditorWindow.Init (exportArray, string.Format (AnimFbxFormat, animationTrackGObject.name, timelineClipSelected.displayName), isTimelineAnim: true);
30643064
}
30653065

3066-
/// <summary>
3067-
/// Add an option " GameObject/Export All Recorded Animation Clips..." in the contextual GameObject menu.
3068-
/// </summary>
3069-
[MenuItem(ClipMenuItemName, false, 31)]
3070-
public static void OnPlayableDirectorGameObjectContextClick(MenuCommand command)
3071-
{
3072-
Object[] selection = null;
3073-
3074-
if (command == null || command.context == null)
3075-
{
3076-
// We were actually invoked from the top GameObject menu, so use the selection.
3077-
selection = Selection.GetFiltered<Object>(SelectionMode.Editable | SelectionMode.TopLevel);
3078-
}
3079-
else
3080-
{
3081-
// We were invoked from the right-click menu, so use the context of the context menu.
3082-
GameObject selected = command.context as GameObject;
3083-
if (selected)
3084-
{
3085-
selection = new GameObject[] { selected };
3086-
}
3087-
}
3088-
3089-
var playableDirectors = new List<UnityEngine.Object> ();
3090-
foreach (GameObject objectWithPlayableDirector in selection)
3091-
{
3092-
PlayableDirector pd = objectWithPlayableDirector.GetComponent<PlayableDirector>();
3093-
if (pd == null) {
3094-
continue;
3095-
}
3096-
playableDirectors.Add (objectWithPlayableDirector);
3097-
}
3098-
ExportModelEditorWindow.Init (playableDirectors, "(automatic)", isTimelineAnim:true, isPlayableDirector:true);
3099-
}
3100-
31013066
public static void ExportAllTimelineClips(GameObject objectWithPlayableDirector, string folderPath, IExportOptions exportOptions = null)
31023067
{
31033068
PlayableDirector pd = objectWithPlayableDirector.GetComponent<PlayableDirector>();
@@ -3123,31 +3088,6 @@ public static void ExportAllTimelineClips(GameObject objectWithPlayableDirector,
31233088
}
31243089
}
31253090
}
3126-
3127-
/// <summary>
3128-
/// Validate the menu item defined by the function OnPlayableDirectorGameObjectContextClick.
3129-
/// </summary>
3130-
[MenuItem(ClipMenuItemName, true, 31)]
3131-
public static bool ValidateClipContextClick()
3132-
{
3133-
Object[] selection = Selection.objects;
3134-
3135-
if (selection == null || selection.Length == 0)
3136-
{
3137-
return false;
3138-
}
3139-
3140-
foreach (Object obj in selection)
3141-
{
3142-
GameObject gameObj = obj as GameObject;
3143-
if (gameObj != null && gameObj.GetComponent<PlayableDirector>() != null)
3144-
{
3145-
return true;
3146-
}
3147-
}
3148-
3149-
return false;
3150-
}
31513091

31523092
/// <summary>
31533093
/// Add a menu item "Export Model..." to a GameObject's context menu.

0 commit comments

Comments
 (0)