public override bool Execute(TimelineWindow.TimelineState state, TrackAsset[] tracks) { for (int i = 0; i < tracks.Length; i++) { TrackAsset trackAsset = tracks[i]; state.timeline.CreateTrack <GroupTrack>(trackAsset, "Track Sub-Group"); TimelineTrackBaseGUI timelineTrackBaseGUI = TimelineTrackBaseGUI.FindGUITrack(trackAsset); if (timelineTrackBaseGUI != null) { TimelineWindow.instance.treeView.data.SetExpanded(timelineTrackBaseGUI, true); } } state.Refresh(); return(true); }
public override bool Execute(WindowState state, TrackAsset[] tracks) { foreach (var track in tracks) { state.editSequence.asset.CreateTrack <GroupTrack>(track, "Track Sub-Group"); var uiTrack = TimelineTrackBaseGUI.FindGUITrack(track); if (uiTrack != null) { TimelineWindow.instance.treeView.data.SetExpanded(uiTrack, true); } } state.Refresh(); return(true); }