public System.Collections.ICollection GetCustomCommands()
        {
            VEGASPythonConfig vegasPythonConfigData;

            vegasPythonConfigData = VEGASPythonConfig.Read_config();

            vPythonWindowCommand             = new CustomCommand(CommandCategory.View, vPythonWindowMName);
            vPythonWindowCommand.DisplayName = vPythonWindowMName;
            vPythonWindowCommand.Invoked    += vPythonWindowCommand_Invoked;
            vPythonWindowCommand.MenuPopup  += vPythonWindowCommand_MenuPopup;


            vPythonWindowCommandList.Add(vPythonWindowCommand);


            // Look for Python scripts in VEGASPython folder

            String DLLDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

            //vSearchPath = DLLDirectory + "\\VEGASPython_PN";

            string path1 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments) + "\\Vegas Application Extensions" + vegasPythonConfigData.VEGASPythonFolder;
            string path2 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData) + "\\Vegas Pro\\Application Extensions" + vegasPythonConfigData.VEGASPythonFolder;
            string path3 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData) + "\\Vegas Pro\\Application Extensions" + vegasPythonConfigData.VEGASPythonFolder;
            string path4 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData) + "\\Vegas Pro\\Application Extensions" + vegasPythonConfigData.VEGASPythonFolder;

            //vSearchPath = DLLDirectory;
            create_command_list(path1, null, true);
            create_command_list(path2, null, true);
            create_command_list(path3, null, true);
            create_command_list(path4, null, true);

            return(vPythonWindowCommandList);
        }
Exemple #2
0
        public void InitializeVEGASPython(Vegas pyVegas,
                                          vPythonForm vpWindowForm)
        {
            if (vpWindowForm != null)
            {
                mvpWindowForm = vpWindowForm;
            }
            myVegas = pyVegas;

            mVegasPythonConfigData = VEGASPythonConfig.Read_config();
        }