Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Nächste Überarbeitung Beide Seiten der Revision
en:vegas_python [2018/10/27 13:22]
hlinke [Specification]
en:vegas_python [2019/06/02 13:27]
hlinke [Download and Installation]
Zeile 6: Zeile 6:
 VEGAS uses the .NET framework to provide its scripting interface. VEGAS can execute C#, JScript, and Visual Basic script files directly. VEGAS uses the .NET framework to provide its scripting interface. VEGAS can execute C#, JScript, and Visual Basic script files directly.
  
-Although JScript, Visual Basic, and C# can be easy to learn, it certainly helps to have programming experience before you try to write a VEGAS script. +PYTHON is an easy to learn powerful programming language that is more and more used for scripting of applications. In the 3D and video editing area some application use already PYTHON for scripting.
- +
-PYTHON is an easy to learn powerful programming language that is more an dmore used for scripting of applications. In the 3D and video editing area some application use already PYTHON for scripting.+
  
 Goal of this VEGAS extension is to provide an easy access to VEGAS scripting using PYTHON. Goal of this VEGAS extension is to provide an easy access to VEGAS scripting using PYTHON.
Zeile 18: Zeile 16:
 {{:en:vegaspython01.jpg?direct&400|}} {{:en:vegaspython01.jpg?direct&400|}}
  
-===== Download ===== +===== Download and Installation ===== 
-[[en:vegas_python_download|Download Page]] +[[en:vegas_python_download|Download and Installation Page]]
- +
- +
- +
-===== Installation ===== +
-VEGASPython is based on IRONPython. Therefore, before you can install VEGASPython, you have to install IRONPython first. +
- +
-Please donwload the newest version from here: +
-[[http://ironpython.net|IronPython.net]] +
-When you click on the IRONPython main page on "Download IRONPython" you will be send to a webpage with a list of IRONPython installation files. +
-The easiest way is to use the .msi file. +
-Download the IronPython-2.7.8.msi (or a file with a higher version) and execute the file. +
-IRONPython will be installed in the Program folder. +
- +
- +
-Afterwards download the file VEGASPython0x.zip. Open the ZIP-Archive and expand or copy all files including the folder "VEGASPython" into one of the following folders: +
- +
-  * C:\Users\<username>\Documents\Vegas Application Extensions\   +
-  * C:\Users\<username>\AppData\Local\VEGAS Pro\1x.0\Application Extensions\  +
-  * C:\Users\<username>\AppData\Roaming\VEGAS Pro\1x.0\Application Extensions\  +
-  * C:\ProgramData\Vegas Pro\1x.0\Application Extensions\   +
-  * C:\Users\<username>\AppData\Local\Vegas Pro\Application Extensions\ +
-  * C:\Users\<username>\AppData\Local\Vegas Pro\Application Extensions\ +
-  * C:\ProgramData\Vegas Pro\Application Extensions\ +
- +
-Where 1x.0 has to be replaced by the installed VEGAS version: 16.0 or 15.0 +
- +
-Normally I use the folder C:\ProgramData\Vegas Pro\Application Extensions\ for extensions. +
-**BUT:** If you want to save Python Scripts from the VEGAS extension this folder is not optimal, as you need Administrator rights to write into this folder. +
- +
-Therefore for VEGASPython I use the folder: +
- +
-**C:\Users\<username>\Documents\Vegas Application Extensions\** +
- +
-If the folder "Vegas Application Extensions" does not exist yet, please create it exactly as it is written here. +
- +
-After copying the files it is possible that you need to unlock the DLL file (Windows locks executable files that you download from Internet automatically). +
- +
-How to unlock the VEGASPython.dll? +
- +
-Right-Click on the file and select "Properties". The propoerties form opens. At the bottom of the form you see a topic "Security". Please check the "Unblock" Checkbox and "Save" the changes.+
  
 ===== Usage ===== ===== Usage =====
-The VEGASPython extension can be used in two ways: +[[en:vegas_python_usage|Usage description Page]]
- +
-  * the interactive VEGASPython window +
-  * VEGASPython scripts in the folder VEGASPython +
- +
-==== Interactive VEGASPython window ==== +
- +
-To allow a very fast and easy Python script creation and execution the extension provides an interactive VEGASPython window. +
- +
-You open the window in VEGAS via "View - Extensions - VEGASPython Interactive Window" +
- +
-{{:en:vegaspython02a.jpg?direct&400|}} +
- +
-This opens the interactive VEGASPython Window: +
- +
-{{:en:vegaspython03.jpg?direct&400|}} +
- +
-The interactive VEGASPython Window consists of two textboxes. +
-The upper textbox is the Input textbox, where you can enter Python commands and scripts. The lower part is the Output textbox that shows the shows the results of the Python Command execution. +
- +
-After the first start of the window the output shows that the script init.py has been executed. +
-This script is located in the same folder as the VEGASPython.dll and includes some inital Python commands that make your life easier. +
-Please feel free to add additional commands or function declarations that you would like to have at hand during your work. +
- +
- +
-The VEGASPython window can float over the VEGAS UI or can be docked into the user interface like all other VEGAS windows. +
-=== Working With the Interactive VEGASPython Window === +
- +
-== Hello World == +
-The standard "Hello World" script is in Python very easy: +
- +
-Enter:  +
-<code python> +
-print("Hello World"+
-</code> +
- +
-in the Input textbox and click on "Execute VEGASPython Script" in the Menu. +
- +
-The result is as follows: +
-{{:en:vegaspython08a.jpg?direct&400|}} +
- +
-The text "Hello World" is printed into the Output textbox. +
-If you did something wrong then you will see an error message in the Output textbox. +
- +
-Please try other texts for printing. +
-You will see that with every click on "Execute VEGASPythonScript" the Output textbox is cleared and the new text is shown in the textbox. +
- +
-== Access to VEGAS == +
-For acessing and controlling VEGAS and VEGAS projects and data structures VEGASPython has a predefined variable +
- +
-"pyVEGAS" +
- +
-Starting from this variable you can access all VEGAS information. +
- +
-Please try following: +
- +
-<code python> +
-print(pyVEGAS.Version) +
-</code> +
- +
-This command prints the current version of VEGAS into the Output textbox: Version 16.0 (Build 261). +
- +
-{{:en:vegaspython11a.jpg?direct&400|}} +
- +
-Now try the following script: +
- +
-<code python> +
-for track in pyVEGAS.Project.Tracks: +
-    print("Track Length:",track.Length.ToString()) +
-</code> +
- +
-Please enter it exactly as it is written here. Important are the 4 blanks in front of the print statement. +
-This script loops over all tracks existing in the current VEGAS project and prints the length of each track. +
- +
-After clicking the "Execute" Menu item the output textbox will show the length of all tracks you have in the current project. +
-If there is no track in the current project, the output textbox remains empty!! +
- +
-More examples for scripts are shown in the examples chapter below. +
- +
-== Loading and Saving Scripts == +
-Via the "File" Menu you can load and save scripts. +
- +
  
 +How can you use VEGASPython and start writing VEGASPython scripts
  
-==== VEGASPython Scripts ==== 
-To allow an easier access to Python Scripts VEGASPython scans the subfolder "VEGASPython". This subfolder must be in the same directory as the VEGASPython.dll. 
  
-{{:en:vegaspython13a.jpg?direct&400|}} 
  
-The scripts in this folder are accessible via "Tools - Extensions" from the VEGAS Menu. 
  
-{{:en:vegaspython05a.jpg?direct&400|}} 
  
-When selecting the Menu-Item in this menu that selected Python Script will be executed immediatly. 
-All output of the script is readirected to the "Output textbox of the Interactive VEGASPython Window". If the window is not open it opens automatically when the script starts.  
  
-=== New Features in Version 2.0 for Scripts ==+===== Python Scripts===== 
-  * [[Debugging of Scripts with Visual Studio 2017|Debugging of Scripts with Visual Studio 2017]] +[[en:vegas_python_scripts|Vegas Python Script Page]]
-  * [[Script hierarchy|Script hierarchy]] +
-  * [[Script help|Script help]] +
-==== Restrictions ==== +
-VEGASPytghon is based on IRONPython. [[http://ironpython.net|http://ironpython.net/]].+
  
-VEGAS scriting is based on .NET. IRONPython allows the use of .NET assemblies with Python. Unfortunately this binding to .NET creates some restrictions. 
  
-Several Python libraries that are base on C or C++ code cannot be used. +===== VEGASPython Tutorial ===== 
-More details can be found in the IRONPython documentation [[http://ironpython.net/documentation/dotnet/|http://ironpython.net/documentation/dotnet/]]+[[en:vegas_python_tutorial|Vegas Python Tutorial]]
  
 +With this tutorial I would like to provide for beginners the know-how to write scripts using VEGASPython.
 +This includes an introduction to Python progamming and to the main concepts of the VEGAS interface.
  
  
-==== Examples ==== 
-see the folder VEGASPython. 
-The folder contains several VEGASPython Scripts that show how to deal with the VEGAS objects, events and tracks. 
  
  
-===== Documentation =====+===== Documentation and Links ===== 
 +VEGASPython Scripting FAQ: (adaption of VEGAS scripting FAQ for VEGASPython) 
 +[[en:vegas_python_FAQ|VEGASPython FAQ]]
  
 VEGAS Scripting FAQ: VEGAS Scripting FAQ:

Andere Sprachen
QR-Code
QR-Code en:vegas_python (erstellt für aktuelle Seite)