Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.94 KB

File metadata and controls

32 lines (26 loc) · 1.94 KB
sidebar_position 1

Context Overview

The context object is passed into edit tasks and dialog flows. Its availability depends on whether the script is in prepareEdit() or performEdit().

Properties

Property prepareEdit performEdit Description
context.editor x Active editor surface.
context.functions x Active edit-function surface.
context.iterator x Iterate selected events.
context.mainTrackList x Track-list surface. Also accessible as context.trackList (same reference).
context.parameters Dialog parameter surface.

Methods

See methods for full documentation of each method.

Method prepareEdit performEdit Description
context.contains(name) Check whether a named attribute exists.
context.countAttributes() Count context properties and attributes in the current phase.
context.getArguments() Read task arguments.
context.getAttribute(name) Get a context attribute or property value by name.
context.getAttributeName(index) Get a context attribute name by index.
context.getAttributeValue(index) Get a context attribute value by index.
context.isSilentMode() Check whether the script is running in silent mode.
context.runDialog(name, pkgID) x Open a dialog from the package's skin.xml. Must be returned from prepareEdit.
context.setAttribute(name, value) Set a context attribute by name.