Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
en:vegas_python [2018/10/27 13:22] hlinke [Installation] |
en:vegas_python [2019/07/28 10:31] (aktuell) hlinke [Introduction] |
||
---|---|---|---|
Zeile 3: | Zeile 3: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | VEGAS Pro allows the control of the application via scripting. | + | VEGAS Pro allows the control of the application via scripting. |
- | VEGAS uses the .NET framework to provide its scripting | + | PYTHON is an easy to learn powerful programming language |
- | 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. | + | Goal of this VEGAS extension is to provide |
- | + | ||
- | 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 | + | |
The extension provides two options: | The extension provides two options: | ||
- | * an interactive dockable VEGASPython Window | + | |
- | * executing Scripts located in a specific folder and integrate them into the VEGAS User Interface like other C# Scripts | + | * new features like VEGASScenedetect |
- | + | * for developers | |
- | {{:en:vegaspython01.jpg?direct&400|}} | + | |
- | + | * executing Scripts located in a specific folder and integrate them into the VEGAS User Interface like other C# Scripts | |
- | ===== Download ===== | + | {{:en:vegaspython01a.jpg? |
- | [[en: | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ===== Usage ===== | + | |
- | The VEGASPython extension can be used in two ways: | + | |
- | + | ||
- | * 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" | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | This opens the interactive VEGASPython Window: | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | 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(" | + | |
- | </ | + | |
- | + | ||
- | in the Input textbox and click on " | + | |
- | + | ||
- | The result is as follows: | + | |
- | {{: | + | |
- | + | ||
- | 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 " | + | |
- | + | ||
- | == Access to VEGAS == | + | |
- | For acessing and controlling VEGAS and VEGAS projects and data structures VEGASPython has a predefined variable | + | |
- | + | ||
- | " | + | |
- | + | ||
- | Starting from this variable you can access all VEGAS information. | + | |
- | + | ||
- | Please try following: | + | |
- | + | ||
- | <code python> | + | |
- | print(pyVEGAS.Version) | + | |
- | </ | + | |
- | + | ||
- | This command prints the current version of VEGAS into the Output textbox: Version 16.0 (Build 261). | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | Now try the following script: | + | |
- | + | ||
- | <code python> | + | |
- | for track in pyVEGAS.Project.Tracks: | + | |
- | print(" | + | |
- | </ | + | |
- | + | ||
- | 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 " | + | |
- | 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 " | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ==== VEGASPython Scripts ==== | + | |
- | To allow an easier access to Python Scripts VEGASPython scans the subfolder " | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | The scripts in this folder are accessible via "Tools - Extensions" | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | 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 " | + | |
- | + | ||
- | === New Features in Version 2.0 for Scripts === | + | |
- | * [[Debugging of Scripts with Visual Studio 2017|Debugging of Scripts with Visual Studio 2017]] | + | |
- | * [[Script hierarchy|Script hierarchy]] | + | |
- | * [[Script help|Script help]] | + | |
- | ==== Restrictions ==== | + | |
- | VEGASPytghon is based on IRONPython. [[http:// | + | |
- | + | ||
- | 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. | + | |
- | More details can be found in the IRONPython documentation [[http:// | + | |
- | + | ||
- | + | ||
- | + | ||
- | ==== Examples ==== | + | |
- | see the folder VEGASPython. | + | |
- | The folder contains several VEGASPython Scripts that show how to deal with the VEGAS objects, events and tracks. | + | |
- | + | ||
- | + | ||
- | ===== Documentation ===== | + | |
- | + | ||
- | VEGAS Scripting FAQ: | + | |
- | [[https:// | + | |
- | + | ||
- | The FAQ describes the usage of VEGAS scriting for C#. The examples can be easily transfered to VEGASPython. An updated FAQ for VEGASPython will follow soon. | + | |
- | + | ||
- | VEGAS Scripting API: | + | |
- | [[https:// | + | |
- | + | ||
- | The API describes the C# definition of all VEGAS structures and items that can be accessed. All these items can be accessed in the same way in VEGASPython. | + | |
- | + | ||
- | Sony VEGAS SDK: | + | |
- | [[https:// | + | |
- | + | ||
- | VEGAS Pro Tools for developers: | + | |
- | [[https:// | + | |
- | + | ||
- | PYTHON documentation: | + | |
- | [[https:// | + | |
- | + | ||
- | PYTHON Tutorials: | + | |
- | [[https:// | + | |
- | IRONPython Website: | + | ===== Download and Installation ===== |
- | [[http:// | + | [[en:vegas_python_download|Download and Installation Page]] |
+ | ====== VEGASPYTHON for Users ====== | ||
+ | Please find details for users on the following page: | ||
+ | [[en: | ||
+ | ====== VEGASPython for Developers ====== | ||
+ | Please find details for developers on the following page: | ||
+ | [[en: | ||