public static bool ExecuteClipAction(ClipAction clipAction, IEnumerable <TimelineClip> clips) { if (clips != null && clips.Any() && clipAction.Validate(clips) == ActionValidity.Valid) { if (clipAction.HasAutoUndo()) { UndoExtensions.RegisterClips(clips, clipAction.GetUndoName()); } return(clipAction.Execute(clips)); } return(false); }
static void BuildMenu(ClipAction action, IEnumerable <TimelineClip> clips, List <MenuActionItem> menuItems, MenuFilter filter) { BuildMenu(action, action.Validate(clips), () => ExecuteClipAction(action, clips), menuItems, filter); }