Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung Letzte Überarbeitung Beide Seiten der Revision | ||
en:vegas_python_download2 [2019/06/10 13:42] hlinke [VEGASPYTHON for Users] |
en:vegas_python_download2 [2019/06/10 13:45] hlinke |
||
---|---|---|---|
Zeile 4: | Zeile 4: | ||
Version: 0.9 | Version: 0.9 | ||
+ | |||
Release Date: June 10th, 2019 | Release Date: June 10th, 2019 | ||
+ | |||
New Features: VEGASSceneDetect | New Features: VEGASSceneDetect | ||
- | {{ : | + | Downloadfile: |
====== VEGASPYTHON for Users ====== | ====== VEGASPYTHON for Users ====== | ||
Zeile 15: | Zeile 17: | ||
====== VEGASPython for Deveopers ====== | ====== VEGASPython for Deveopers ====== | ||
+ | Please find details for developers on the following page: | ||
[[en: | [[en: | ||
- | ====== Readme.txt ====== | ||
- | |||
- | Version 0.9 - June 2nd , 2019 | ||
- | Author: Harold Linke | ||
- | |||
- | This is a Vegas Pro Custom Command Extension adding a Python Scripting Interpreter to VEGAS | ||
====== Installation ====== | ====== Installation ====== | ||
Zeile 77: | Zeile 74: | ||
The file must have the same name as the clip and has to be located in the same directory. The only difference is the extension .scn.xml for the scene detection file. | The file must have the same name as the clip and has to be located in the same directory. The only difference is the extension .scn.xml for the scene detection file. | ||
When importing, VEGAS automatically adds the clips and all its scenes as subclips to the media pool. | When importing, VEGAS automatically adds the clips and all its scenes as subclips to the media pool. | ||
- | |||
- | |||
- | ====== VEGASPython Interactive Window ====== | ||
- | |||
- | In addition VEGASPython includes an interactive window. | ||
- | VEGASPython interactive window is activated via the ' | ||
- | |||
- | A VEGAS dockable window opens. The window can float over VEGAS or can be integrated into the VEGAS layout as any other VEGAS window. | ||
- | |||
- | The VEGASPython window shows two textboxes: | ||
- | |||
- | - Input PYTHON Comands | ||
- | - Output | ||
- | |||
- | and a menu with two items " | ||
- | |||
- | Python comands are entered in the textbox " | ||
- | The PYTHON commands will be executed by clicking on the menu " | ||
- | |||
- | All output from PYTHON print statements and all error messages will be shown in the " | ||
- | |||
- | VEGASPython is based on Python 3.7.3 and PythonNet. | ||
- | |||
- | The VEGAS API can be accessed directly by using the build-in variable " | ||
- | All VEGAS API items are available. | ||
- | |||
- | ====== Examples ====== | ||
- | |||
- | ---- | ||
- | |||
- | Example for a simple script that can be used in the interactive window: | ||
- | |||
- | import clr | ||
- | clr.AddReference(' | ||
- | import ScriptPortal.Vegas | ||
- | from ScriptPortal.Vegas import * | ||
- | # adapt this value to your needs | ||
- | maxLength = Timecode.FromString(" | ||
- | # Go through the list of Tracks | ||
- | for track in pyVEGAS.Project.Tracks: | ||
- | for evnt in track.Events: | ||
- | if (evnt.Selected): | ||
- | dLength = evnt.Length | ||
- | if dLength > maxLength: | ||
- | dLength = maxLength | ||
- | dStart = evnt.Start | ||
- | evnt.AdjustStartLength(dStart, | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | A script that is used as an extension needs to be included in a function FromVegas. See example below. | ||
- | |||
- | import clr | ||
- | clr.AddReference(' | ||
- | import ScriptPortal.Vegas | ||
- | from ScriptPortal.Vegas import * | ||
- | def FromVegas(pyVEGAS): | ||
- | # adapt this value to your needs | ||
- | maxLength = Timecode.FromString(" | ||
- | # Go through the list of Tracks | ||
- | for track in pyVEGAS.Project.Tracks: | ||
- | for evnt in track.Events: | ||
- | if (evnt.Selected): | ||
- | dLength = evnt.Length | ||
- | if dLength > maxLength: | ||
- | dLength = maxLength | ||
- | dStart = evnt.Start | ||
- | evnt.AdjustStartLength(dStart, | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||