#cp.apple.finalcutpro.timeline.Timeline

Timeline Module. The timeline module provides an interface to the Final Cut Pro timeline. It delegates to the contents property, so any functions which can be called on the contents property can be called on the Timeline module.


#API Overview

Functions - API calls offered directly by the extension

Constructors - API calls which return an object, typically one that offers API methods

Fields - Variables which can only be accessed from an object returned by a constructor

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Functions

Signaturecp.apple.finalcutpro.timeline.Timeline.matches(element) -> boolean
TypeFunction
DescriptionChecks to see if an element matches what we think it should be.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if matches otherwise false.
Notes
  • element should be an AXGroup, which contains an AXSplitGroup with an
  • AXIdentifier of _NS:237 (as of Final Cut Pro 10.4)
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 42

Signaturecp.apple.finalcutpro.timeline.Timeline.matchesMain(element) -> boolean
TypeFunction
DescriptionChecks to see if an element matches what we think it should be.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if matches otherwise false
Notes
  • element should be an AXSplitGroup with an AXIdentifier of _NS:237
  • (as of Final Cut Pro 10.4)
  • Because the timeline contents is hard to detect, we look for the timeline
  • toolbar instead.
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 62

#Constructors

Signaturecp.apple.finalcutpro.timeline.Timeline(app) -> Timeline
TypeConstructor
DescriptionCreates a new Timeline instance.
Parameters
  • app - The cp.apple.finalcutpro object.
Returns
  • A new Timeline object.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 107

#Fields

Signaturecp.apple.finalcutpro.timeline.Timeline.contents <cp.apple.finalcutpro.timeline.Contents>
TypeField
DescriptionThe Timeline Contents. The Content is the main body of the timeline,
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 380

Signaturecp.apple.finalcutpro.timeline.Timeline.effects <cp.apple.finalcutpro.main.EffectsBrowser>
TypeField
DescriptionThe (sometimes hidden) Effect Browser.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 388

Signaturecp.apple.finalcutpro.timeline.Timeline.index <cp.apple.finalcutpro.timeline.Index>
TypeField
DescriptionThe Index.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 427

Signaturecp.apple.finalcutpro.timeline.Timeline.isFocused <cp.prop: boolean>
TypeField
DescriptionIs the timeline focused?
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 179

Signaturecp.apple.finalcutpro.timeline.Timeline.isOnPrimary <cp.prop: boolean; read-only>
TypeField
DescriptionChecks if the Timeline is on the Primary Display.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 138

Signaturecp.apple.finalcutpro.timeline.Timeline.isOnSecondary <cp.prop: boolean; read-only>
TypeField
DescriptionChecks if the Timeline is on the Secondary Display.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 128

Signaturecp.apple.finalcutpro.timeline.Timeline.isPlaying <cp.prop: boolean>
TypeField
DescriptionIs the timeline playing?
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 172

Signaturecp.apple.finalcutpro.timeline.Timeline.isShowing <cp.prop: boolean; read-only>
TypeField
DescriptionChecks if the Timeline is showing on either the Primary or Secondary display.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 148

Signaturecp.apple.finalcutpro.timeline.Timeline.mainUI <cp.prop: hs.axuielement; read-only>
TypeField
DescriptionReturns the axuielement representing the 'timeline', or nil if not available.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 158

Signaturecp.apple.finalcutpro.timeline.Timeline.rangeSelected <cp.prop: boolean; read-only>
TypeField
DescriptionChecks if a range is selected in the timeline.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 416

Signaturecp.apple.finalcutpro.timeline.Timeline.speedPopover <cp.apple.finalcutpro.timeline.SpeedPopover>
TypeField
DescriptionThe SpeedPopover.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 472

Signaturecp.apple.finalcutpro.timeline.Timeline.title <cp.ui.StaticText>
TypeField
DescriptionThe StaticText containing the title.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 409

Signaturecp.apple.finalcutpro.timeline.Timeline.toolbar <Toolbar>
TypeField
DescriptionThe bar at the top of the timeline.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 402

Signaturecp.apple.finalcutpro.timeline.Timeline.transitions <cp.apple.finalcutpro.main.EffectsBrowser>
TypeField
DescriptionThe (sometimes hidden) Transitions Browser.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 395

#Methods

Signaturecp.apple.finalcutpro.timeline.Timeline:app() -> App
TypeMethod
DescriptionReturns the app instance representing Final Cut Pro.
Parameters
  • None
Returns
  • App
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 186

Signaturecp.apple.finalcutpro.timeline.Timeline:doHide() -> cp.rx.go.Statement
TypeMethod
DescriptionReturns a Statement that will hide the Timeline (regardless of whether it was on the Primary or Secondary window).
Parameters
  • None
Returns
  • A Statement ready to run.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 342

Signaturecp.apple.finalcutpro.timeline.Timeline:doOpenProject(title) -> cp.rx.go.Statement
TypeMethod
DescriptionOpens a project from the timeline navigation popups.
Parameters
  • title - The title of the project you want to open.
Returns
  • The Statement to run.
Notes
  • The title supports patterns, so you can do things like:
  • require("cp.apple.finalcutpro").timeline:doOpenProject("Audio.*"):Now()
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 448

Signaturecp.apple.finalcutpro.timeline.Timeline:doShowOnPrimary() -> cp.rx.go.Statement <boolean>
TypeMethod
DescriptionReturns a Statement that will ensure the timeline is in the primary window.
Parameters
  • timeout - The timeout period for the operation.
Returns
  • A Statement which will send true if it successful, or false otherwise.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 252

Signaturecp.apple.finalcutpro.timeline.Timeline:doShowOnSecondary() -> cp.rx.go.Statement <boolean>
TypeMethod
DescriptionReturns a Statement that will ensure the timeline is in the secondary window.
Parameters
  • timeout - The timeout period for the operation.
Returns
  • A Statement which will send true if it successful, or false otherwise.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 300

Signaturecp.apple.finalcutpro.timeline.Timeline:hide() -> Timeline
TypeMethod
DescriptionHide's the Timeline (regardless of whether it was on the Primary or Secondary display).
Parameters
  • None
Returns
  • Timeline object.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 321

Signaturecp.apple.finalcutpro.timeline.Timeline:show() -> Timeline
TypeMethod
DescriptionShow's the Timeline on the Primary Display.
Parameters
  • None
Returns
  • Timeline object.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 205

Signaturecp.apple.finalcutpro.timeline.Timeline:showOnPrimary() -> Timeline
TypeMethod
DescriptionShow's the Timeline on the Primary Display.
Parameters
  • None
Returns
  • Timeline object.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 228

Signaturecp.apple.finalcutpro.timeline.Timeline:showOnSecondary() -> Timeline
TypeMethod
DescriptionShow's the Timeline on the Secondary Display.
Parameters
  • None
Returns
  • Timeline object.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/timeline/Timeline.lua line 280