Exemplo n.º 1
0
        public ICollection GetCustomCommands()
        {
            MainCMD.AddChild(new ImportFlpCMD(myVegas));
            MainCMD.AddChild(new FlipVideoCMD(myVegas));

            return(new CustomCommand[] { MainCMD });
        }
Exemplo n.º 2
0
        private CustomCommand BuildMarkerAndRegionMenu()
        {
            var subMenu = new CustomCommand(CommandCategory.Tools, "BluffMarkerAndRegion")
            {
                DisplayName = "Marker And Regions"
            };

            subMenu.AddChild(CreateToolMenuItem("BluffConvertMarkersToRegions", "Convert Markers To Regions", ConvertMarkersToRegions.Execute));
            subMenu.AddChild(CreateToolMenuItem("BluffReorderMarkers", "Reorder Markers and Regions", ReorderMarkers.Execute));
            subMenu.AddChild(CreateToolMenuItem("BluffSplitRegion", "Split Region", SplitRegion.Execute));

            return(subMenu);
        }
Exemplo n.º 3
0
        private CustomCommand BuildEventMenu()
        {
            var subMenu = new CustomCommand(CommandCategory.Tools, "BluffEvent")
            {
                DisplayName = "Events"
            };

            subMenu.AddChild(CreateToolMenuItem("BluffArrangeEventsByCreatedTimestamp", "Arrange Events By Created Timestamp", ArrangeEventsByCreatedTimestamp.Execute));
            subMenu.AddChild(CreateToolMenuItem("BluffOrderEventsByNameTime", "Order Events By Name and In Time", OrderEventsByNameAndTime.Execute));
            subMenu.AddChild(CreateToolMenuItem("BluffRandomizeEvents", "Randomize Events", OrderEventsByRandom.Execute));

            return(subMenu);
        }
Exemplo n.º 4
0
        private CustomCommand BuildTrackMotionMenu()
        {
            var subMenu = new CustomCommand(CommandCategory.Tools, "BluffMotion")
            {
                DisplayName = "Motion"
            };

            subMenu.AddChild(CreateToolMenuItem("BluffCreateVideoWall", "Create Video Wall", InsertVideoWall.Execute));
#if DEBUG
            subMenu.AddChild(CreateToolMenuItem("BluffTrackAlongBezier", "Track Along Bezier", TrackAlongBezier.Execute));
#endif
            return(subMenu);
        }
Exemplo n.º 5
0
        internal void MarkerInit(Vegas Vegas, ref ArrayList CustomCommands)
        {
            myVegas = Vegas;

            MarkerParentCommand.AddChild(MarkerCreateFromEventsCommand);
            MarkerParentCommand.AddChild(MarkerSetIntervalCommand);
            MarkerParentCommand.AddChild(MarkerCreateMultiCommand);
            MarkerCreateFromEventsCommand.Invoked += MarkerCreateFromEventsCommand_Invoked;
            MarkerSetIntervalCommand.Invoked      += MarkerSetIntervalCommand_Invoked;
            MarkerCreateMultiCommand.Invoked      += MarkerCreateMultiCommand_Invoked;

            CustomCommands.Add(MarkerParentCommand);
        }
Exemplo n.º 6
0
        public ICollection GetCustomCommands()
        {
            var menu = new CustomCommand(CommandCategory.Tools, "Bluff")
            {
                DisplayName = "Bluff"
            };

            menu.AddChild(BuildTrackMotionMenu());
            menu.AddChild(BuildEventMenu());
            menu.AddChild(BuildMarkerAndRegionMenu());

            menu.AddChild(CreateToolMenuItem("BluffZZZHelpAbout", "About Bluff", ShowAboutBluffWpf));

            return(new[] { menu });
        }
Exemplo n.º 7
0
        internal void RegionAdjustInit(Vegas Vegas, ref ArrayList CustomCommands)
        {
            myVegas = Vegas;
            RegionAdjustParent.AddChild(RegionAdjustAutoSize);
            RegionAdjustParent.AddChild(RegionAdjustNudgeLeft);
            RegionAdjustParent.AddChild(RegionAdjustNudgeRight);
            RegionAdjustParent.AddChild(RegionAdjustResizeIn);
            RegionAdjustParent.AddChild(RegionAdjustResizeOut);
            RegionAdjustParent.AddChild(RegionAdjustSpacingIn);
            RegionAdjustParent.AddChild(RegionAdjustSpacingOut);

            RegionAdjustAutoSize.Invoked   += RegionAdjustAutoSize_Invoked;
            RegionAdjustNudgeLeft.Invoked  += RegionAdjustNudgeLeft_Invoked;
            RegionAdjustNudgeRight.Invoked += RegionAdjustNudgeRight_Invoked;
            RegionAdjustResizeIn.Invoked   += RegionAdjustResizeIn_Invoked;
            RegionAdjustResizeOut.Invoked  += RegionAdjustResizeOut_Invoked;
            RegionAdjustSpacingIn.Invoked  += RegionAdjustSpacingIn_Invoked;
            RegionAdjustSpacingOut.Invoked += RegionAdjustSpacingOut_Invoked;

            CustomCommands.Add(RegionAdjustParent);
            CustomCommands.Add(RegionAdjustAutoSize);
            CustomCommands.Add(RegionAdjustNudgeLeft);
            CustomCommands.Add(RegionAdjustNudgeRight);
            CustomCommands.Add(RegionAdjustResizeIn);
            CustomCommands.Add(RegionAdjustResizeOut);
            CustomCommands.Add(RegionAdjustSpacingIn);
            CustomCommands.Add(RegionAdjustSpacingOut);
        }
Exemplo n.º 8
0
        internal void ProjectFileInit(Vegas Vegas, ref ArrayList CustomCommands)
        {
            myVegas = Vegas;
            ProjectFileNewVersionCommand.DisplayName  = ProjectFileStrings.FileNewVersionWindowTitle;
            ProjectFileNewVersionCommand.MenuItemName = ProjectFileStrings.FileNewVersionMenuTitle;
            ProjectFileNewVersionCommand.Invoked     += ProjectFileNewVersionCommand_Invoked;

            ProjectFileParentCommand.AddChild(ProjectFileNewVersionCommand);

            CustomCommands.Add(ProjectFileParentCommand);
            CustomCommands.Add(ProjectFileNewVersionCommand);
        }
Exemplo n.º 9
0
        internal void EventEdgeInit(Vegas Vegas, ref ArrayList CustomCommands)
        {
            myVegas = Vegas;
            CustomCommands.Add(EventEdgeParent);

            EventEdgeLftAuto.Invoked   += EventEdgeLftAuto_Invoked;
            EventEdgeLftCursor.Invoked += EventEdgeLftCr_Invoke;
            EventEdgeLftAdj.Invoked    += EventEdgeLftIn_Invoke;
            EventEdgeParent.AddChild(EventEdgeLftAuto);
            EventEdgeParent.AddChild(EventEdgeLftCursor);
            EventEdgeParent.AddChild(EventEdgeLftAdj);
            CustomCommands.Add(EventEdgeLftAdj);
            CustomCommands.Add(EventEdgeLftAuto);
            CustomCommands.Add(EventEdgeLftCursor);

            EventEdgeRgtAuto.Invoked   += EventEdgeRgtAuto_Invoked;
            EventEdgeRgtCursor.Invoked += EventEdgeRgtCr_Invoke;
            EventEdgeRgtAdj.Invoked    += EventEdgeRgtIn_Invoke;

            EventEdgeParent.AddChild(EventEdgeRgtAdj);
            EventEdgeParent.AddChild(EventEdgeRgtAuto);
            EventEdgeParent.AddChild(EventEdgeRgtCursor);

            CustomCommands.Add(EventEdgeRgtAdj);
            CustomCommands.Add(EventEdgeRgtAuto);
            CustomCommands.Add(EventEdgeRgtCursor);
        }
Exemplo n.º 10
0
        internal void EventPitchInit(Vegas Vegas, ref ArrayList CustomCommands)
        {
            myVegas = Vegas;

            // Pitch
            CmdEventPitchUpOne.Invoked += EventPitchUpOne_Invoke;
            CmdEventPitchUpOct.Invoked += EventPitchUpOct_Invoke;
            CmdEventPitchDnOne.Invoked += EventPitchDnOne_Invoke;
            CmdEventPitchDnOct.Invoked += EventPitchDnOct_Invoke;
            CmdEventPitchReset.Invoked += EventPitchReset_Invoke;
            CmdEventPitchSet.Invoked   += EventPitchSet_Invoke;

            CmdEventPitchParent.AddChild(CmdEventPitchUpOne);
            CmdEventPitchParent.AddChild(CmdEventPitchUpOct);
            CmdEventPitchParent.AddChild(CmdEventPitchDnOne);
            CmdEventPitchParent.AddChild(CmdEventPitchDnOct);
            CmdEventPitchParent.AddChild(CmdEventPitchReset);
            CmdEventPitchParent.AddChild(CmdEventPitchSet);

            CustomCommands.Add(CmdEventPitchParent);
            CustomCommands.Add(CmdEventPitchUpOne);
            CustomCommands.Add(CmdEventPitchUpOct);
            CustomCommands.Add(CmdEventPitchReset);
            CustomCommands.Add(CmdEventPitchDnOne);
            CustomCommands.Add(CmdEventPitchDnOct);
            CustomCommands.Add(CmdEventPitchSet);
        }
Exemplo n.º 11
0
        internal void SelectionInit(Vegas Vegas, ref ArrayList CustomCommands)
        {
            myVegas = Vegas;

            SelectionFitToEventsCommand.Invoked += SelectionFitToEnclosedEvents_Invoke;
            SelectionParent.AddChild(SelectionFitToEventsCommand);

            SelectionFindRegionCommand.Invoked += SelectionFindRegion_Invoke;
            SelectionParent.AddChild(SelectionFindRegionCommand);

            SelectionFindAgainCommand.Invoked += SelectionFindAgain_Invoke;
            SelectionParent.AddChild(SelectionFindAgainCommand);

            SelectionSetToCurrentRegion.Invoked += SelectionSetToCurrentRegion_Invoked;
            SelectionParent.AddChild(SelectionSetToCurrentRegion);

            CustomCommands.Add(SelectionParent);
            CustomCommands.Add(SelectionFindRegionCommand);
            CustomCommands.Add(SelectionFindAgainCommand);
            CustomCommands.Add(SelectionFitToEventsCommand);
            CustomCommands.Add(SelectionSetToCurrentRegion);
        }
Exemplo n.º 12
0
        internal void EventPosInit(Vegas Vegas, ref ArrayList CustomCommands)
        {
            myVegas = Vegas;
            // Interval
            EventPosInterUpSt.Invoked += EventPosInterUpSt_Invoke;
            EventPosInterDnSt.Invoked += EventPosInterDnSt_Invoke;
            EventPosInterAuto.Invoked += EventPosInterAuto_Invoke;
            EventPosInterUser.Invoked += EventPosInterUser_Invoke;
            EventPosParent.AddChild(EventPosInterUpSt);
            EventPosParent.AddChild(EventPosInterDnSt);
            EventPosParent.AddChild(EventPosInterAuto);
            EventPosParent.AddChild(EventPosInterUser);

            // Space
            EventPosSpaceAuto.Invoked += EventPosSpaceAuto_Invoke;
            EventPosSpaceUser.Invoked += EventPosSpaceUser_Invoke;
            EventPosParent.AddChild(EventPosSpaceAuto);
            EventPosParent.AddChild(EventPosSpaceUser);

            // Align
            EventPosAlignLeft.Invoked      += EventPosAlignLeft_Invoke;
            EventPosAlignRight.Invoked     += EventPosAlignRight_Invoke;
            EventPosAlignByMarkers.Invoked += EventPosAlignByMarkers_Invoked;
            EventPosParent.AddChild(EventPosAlignLeft);
            EventPosParent.AddChild(EventPosAlignRight);
            EventPosParent.AddChild(EventPosAlignByMarkers);

            CustomCommands.Add(EventPosParent);
            CustomCommands.Add(EventPosInterUpSt);
            CustomCommands.Add(EventPosInterDnSt);
            CustomCommands.Add(EventPosInterAuto);
            CustomCommands.Add(EventPosInterUser);

            CustomCommands.Add(EventPosSpaceAuto);
            CustomCommands.Add(EventPosSpaceUser);

            CustomCommands.Add(EventPosAlignLeft);
            CustomCommands.Add(EventPosAlignRight);
            CustomCommands.Add(EventPosAlignByMarkers);
        }
Exemplo n.º 13
0
        private void create_command_list(string pSearchPath, CustomCommand parent, bool includesubdir)
        {
            if (Directory.Exists(pSearchPath))
            {
                string[] VEGASPythonfileArray;

                if (includesubdir)
                {
                    VEGASPythonfileArray = Directory.GetDirectories(pSearchPath);

                    foreach (string pythonscriptfilepathname in VEGASPythonfileArray)
                    {
                        if (Directory.Exists(pythonscriptfilepathname))                                        //name is directory
                        {
                            if (!(File.Exists(pythonscriptfilepathname + "\\__init__.py")))                    // check if directory is a python package
                            {
                                string pythonscriptpathname = Path.GetDirectoryName(pythonscriptfilepathname); // gets the parent directory path
                                string directoryname        = pythonscriptfilepathname.Substring(pythonscriptpathname.Length + 1);

                                if (directoryname.Substring(0, 1) != "_") //ignore directories with leading _
                                {
                                    CustomCommand vPythonScriptCommand = new CustomCommand(CommandCategory.Tools, directoryname);

                                    vPythonScriptCommand.DisplayName = directoryname;
                                    vPythonScriptCommand.Invoked    += vPythonScript_Invoked;

                                    if (parent == null)
                                    {
                                        vPythonWindowCommandList.Add(vPythonScriptCommand);
                                    }
                                    else
                                    {
                                        parent.AddChild(vPythonScriptCommand);
                                    }
                                    create_command_list(pythonscriptfilepathname, vPythonScriptCommand, false);
                                }
                            }
                        }
                    }
                }

                VEGASPythonfileArray = Directory.GetFiles(pSearchPath);
                foreach (string pythonscriptfilepathname in VEGASPythonfileArray)
                {
                    {
                        if (File.Exists(pythonscriptfilepathname)) // name is a file
                        {
                            string psextension      = Path.GetExtension(pythonscriptfilepathname);
                            string pythonscriptname = Path.GetFileNameWithoutExtension(pythonscriptfilepathname);

                            if ((psextension == ".py") && (!(pythonscriptname == "wingdbstub")))
                            {
                                string line;
                                System.IO.StreamReader file = new System.IO.StreamReader(pythonscriptfilepathname);
                                line = file.ReadLine();


                                if (!string.IsNullOrEmpty(line))
                                {
                                    CustomCommand vPythonScriptCommand = new CustomCommand(CommandCategory.Tools, pythonscriptname);
                                    vPythonScriptCommand.MenuSelectMessage = "Execute " + pythonscriptname;
                                    vPythonScriptCommand.DisplayName       = pythonscriptname;
                                    string iconFilename = pythonscriptfilepathname.Replace(".py", ".png");
                                    if (File.Exists(iconFilename))
                                    {
                                        vPythonScriptCommand.IconFile = iconFilename;
                                    }
                                    else
                                    {
                                        iconFilename = pythonscriptfilepathname.Replace(pythonscriptname + ".py", "VegasPython.png");
                                        if (File.Exists(iconFilename))
                                        {
                                            vPythonScriptCommand.IconFile = iconFilename;
                                        }
                                    }

                                    vPythonScriptCommand.Invoked += vPythonScript_Invoked;

                                    if (line.Contains("#"))
                                    {
                                        vPythonScriptCommand.MenuSelectMessage = line;
                                    }
                                    else
                                    {
                                        int    start       = line.IndexOf("\"\"\"");
                                        string commentline = line;
                                        if (start > 0)
                                        {
                                            commentline = line.Substring(start + 3);
                                            int end = commentline.IndexOf("\"\"\"");
                                            if (end > 0)
                                            {
                                                commentline = commentline.Substring(0, end - 1);
                                            }
                                        }
                                        vPythonScriptCommand.MenuSelectMessage = commentline;
                                    }



                                    // vPythonScriptCommand.MenuPopup += vPythonScript_MenuPopup;
                                    if (parent == null)
                                    {
                                        vPythonWindowCommandList.Add(vPythonScriptCommand);
                                    }
                                    else
                                    {
                                        parent.AddChild(vPythonScriptCommand);
                                    }
                                }
                                file.Close();
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 14
0
        public void MetaTakesInit(Vegas Vegas, ref ArrayList CustomCommands)
        {
            myVegas = Vegas;
            //*/
            MetaTakesFirstCommand.Invoked    += MetaTakesFirst_Invoke;
            MetaTakesNextCommand.Invoked     += MetaTakesNext_Invoke;
            MetaTakesPrevCommand.Invoked     += MetaTakesPrev_Invoke;
            MetaTakeGroupNextCommand.Invoked += MetaTakeGroupNextCommand_Invoked;
            MetaTakeGroupPrevCommand.Invoked += MetaTakeGroupPrevCommand_Invoked;
            //MetaTakesGetOffsetCommand.Invoked += new EventHandler(MetaTakesGetOffset_invoke);
            MetaTakesSetOffsetCommand.Invoked   += MetaTakesSetOffset_invoke;
            MetaTakesResetOffsetCommand.Invoked += MetaTakesResetOffset_invoke;
            MetaTakesSplitEventCommand.Invoked  += MetaTakesSplit_Invoke;
            MetaTakesDistFirstCommand.Invoked   += MetaTakesDistFirstCommand_Invoked;
            MetaTakesDistSeqCommand.Invoked     += MetaTakesDistSeqCommand_Invoked;
            MetaTakesDistRndCommand.Invoked     += MetaTakesDistRndCommand_Invoked;
            MetaTakesDistRevCommand.Invoked     += MetaTakesDistRevCommand_Invoked;

            MetaTakesParent.AddChild(MetaTakesFirstCommand);
            MetaTakesParent.AddChild(MetaTakesNextCommand);
            MetaTakesParent.AddChild(MetaTakesPrevCommand);
            MetaTakesParent.AddChild(MetaTakeGroupNextCommand);
            MetaTakesParent.AddChild(MetaTakeGroupPrevCommand);
            //MetaTakesParent.AddChild(MetaTakesGetOffsetCommand);
            MetaTakesParent.AddChild(MetaTakesSetOffsetCommand);
            MetaTakesParent.AddChild(MetaTakesResetOffsetCommand);
            MetaTakesParent.AddChild(MetaTakesSplitEventCommand);
            MetaTakesParent.AddChild(MetaTakesDistSeqCommand);
            MetaTakesParent.AddChild(MetaTakesDistRndCommand);
            MetaTakesParent.AddChild(MetaTakesDistRevCommand);

            CustomCommands.Add(MetaTakesParent);
            CustomCommands.Add(MetaTakesFirstCommand);
            CustomCommands.Add(MetaTakesNextCommand);
            CustomCommands.Add(MetaTakesPrevCommand);
            CustomCommands.Add(MetaTakeGroupNextCommand);
            CustomCommands.Add(MetaTakeGroupPrevCommand);
            //CustomCommands.Add(MetaTakesGetOffsetCommand);
            CustomCommands.Add(MetaTakesSetOffsetCommand);
            CustomCommands.Add(MetaTakesResetOffsetCommand);
            CustomCommands.Add(MetaTakesSplitEventCommand);
            CustomCommands.Add(MetaTakesDistSeqCommand);
            CustomCommands.Add(MetaTakesDistRndCommand);
            CustomCommands.Add(MetaTakesDistRevCommand);
            //*/
        }