コード例 #1
0
 public static bool ExecuteTrackAction(TrackAction trackAction, IEnumerable <TrackAsset> tracks)
 {
     if (tracks != null && tracks.Any() && trackAction.Validate(tracks) == ActionValidity.Valid)
     {
         if (trackAction.HasAutoUndo())
         {
             UndoExtensions.RegisterTracks(tracks, trackAction.GetUndoName());
         }
         return(trackAction.Execute(tracks));
     }
     return(false);
 }
コード例 #2
0
 static void BuildMenu(TrackAction action, IEnumerable <TrackAsset> tracks, List <MenuActionItem> menuItems, MenuFilter filter)
 {
     BuildMenu(action, action.Validate(tracks), () => ExecuteTrackAction(action, tracks), menuItems, filter);
 }