Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
272 lines (232 loc) · 23.5 KB

File metadata and controls

272 lines (232 loc) · 23.5 KB

docs » cp.apple.finalcutpro.timeline.Timeline


Timeline Module.

API Overview

API Documentation

Functions

Signature cp.apple.finalcutpro.timeline.Timeline.matches(element) -> boolean
Type Function
Description Checks 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)
Signature cp.apple.finalcutpro.timeline.Timeline.matchesMain(element) -> boolean
Type Function
Description Checks 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.

Constructors

Signature cp.apple.finalcutpro.timeline.Timeline(app) -> Timeline
Type Constructor
Description Creates a new Timeline instance.
Parameters
  • app - The cp.apple.finalcutpro object.
Returns
  • A new Timeline object.

Fields

Signature cp.apple.finalcutpro.timeline.Timeline.contents <cp.apple.finalcutpro.timeline.Contents>
Type Field
Description The Timeline Contents. The Content is the main body of the timeline,
Signature cp.apple.finalcutpro.timeline.Timeline.effects <cp.apple.finalcutpro.main.EffectsBrowser>
Type Field
Description The (sometimes hidden) Effect Browser.
Signature cp.apple.finalcutpro.timeline.Timeline.index <cp.apple.finalcutpro.timeline.Index>
Type Field
Description The Index.
Signature cp.apple.finalcutpro.timeline.Timeline.isFocused <cp.prop: boolean; read-only>
Type Field
Description Checks if the Timeline is the focused panel.
Signature cp.apple.finalcutpro.timeline.Timeline.isLoaded <cp.prop: boolean; read-only>
Type Field
Description Checks if the Timeline has finished loading.
Signature cp.apple.finalcutpro.timeline.Timeline.isLockedInCentre <cp.prop: boolean>
Type Field
Description Is Playhead Locked in the centre?
Signature cp.apple.finalcutpro.timeline.Timeline.isLockedPlayhead <cp.prop: boolean>
Type Field
Description Is Playhead Locked?
Signature cp.apple.finalcutpro.timeline.Timeline.isOnPrimary <cp.prop: boolean; read-only>
Type Field
Description Checks if the Timeline is on the Primary Display.
Signature cp.apple.finalcutpro.timeline.Timeline.isOnSecondary <cp.prop: boolean; read-only>
Type Field
Description Checks if the Timeline is on the Secondary Display.
Signature cp.apple.finalcutpro.timeline.Timeline.isPlaying <cp.prop: boolean>
Type Field
Description Is the timeline playing?
Signature cp.apple.finalcutpro.timeline.Timeline.isShowing <cp.prop: boolean; read-only>
Type Field
Description Checks if the Timeline is showing on either the Primary or Secondary display.
Signature cp.apple.finalcutpro.timeline.Timeline.mainUI <cp.prop: hs._asm.axuielement; read-only>
Type Field
Description Returns the axuielement representing the 'timeline', or nil if not available.
Signature cp.apple.finalcutpro.timeline.Timeline.playhead <Playhead>
Type Field
Description The Timeline Playhead.
Signature cp.apple.finalcutpro.timeline.Timeline.rangeSelected <cp.prop: boolean; read-only>
Type Field
Description Checks if a range is selected in the timeline.
Signature cp.apple.finalcutpro.timeline.Timeline.skimmingPlayhead <Playhead>
Type Field
Description The Playhead that tracks under the mouse while skimming.
Signature cp.apple.finalcutpro.timeline.Timeline.speedPopover <cp.apple.finalcutpro.timeline.SpeedPopover>
Type Field
Description The SpeedPopover.
Signature cp.apple.finalcutpro.timeline.Timeline.title <cp.ui.StaticText>
Type Field
Description The StaticText containing the title.
Signature cp.apple.finalcutpro.timeline.Timeline.toolbar <Toolbar>
Type Field
Description The bar at the top of the timeline.
Signature cp.apple.finalcutpro.timeline.Timeline.transitions <cp.apple.finalcutpro.main.EffectsBrowser>
Type Field
Description The (sometimes hidden) Transitions Browser.

Methods

Signature cp.apple.finalcutpro.timeline.Timeline:app() -> App
Type Method
Description Returns the app instance representing Final Cut Pro.
Parameters
  • None
Returns
  • App
Signature cp.apple.finalcutpro.timeline.Timeline:doFocus() -> cp.rx.Statement
Type Method
Description A Statement that will attempt to focus on the Timeline.
Signature cp.apple.finalcutpro.timeline.Timeline:doHide() -> cp.rx.go.Statement
Type Method
Description Returns a Statement that will hide the Timeline (regardless of whether it
Parameters
  • None
Returns
  • A Statement ready to run.
Signature cp.apple.finalcutpro.timeline.Timeline:doOpenProject(title) -> cp.rx.go.Statement
Type Method
Description Opens 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()
Signature cp.apple.finalcutpro.timeline.Timeline:doShowOnPrimary() -> cp.rx.go.Statement <boolean>
Type Method
Description Returns 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.
Signature cp.apple.finalcutpro.timeline.Timeline:doShowOnSecondary() -> cp.rx.go.Statement <boolean>
Type Method
Description Returns 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.
Signature cp.apple.finalcutpro.timeline.Timeline:hide() -> Timeline
Type Method
Description Hide's the Timeline (regardless of whether it was on the Primary or Secondary display).
Parameters
  • None
Returns
  • Timeline object.
Signature cp.apple.finalcutpro.timeline.Timeline:show() -> Timeline
Type Method
Description Show's the Timeline on the Primary Display.
Parameters
  • None
Returns
  • Timeline object.
Signature cp.apple.finalcutpro.timeline.Timeline:showOnPrimary() -> Timeline
Type Method
Description Show's the Timeline on the Primary Display.
Parameters
  • None
Returns
  • Timeline object.
Signature cp.apple.finalcutpro.timeline.Timeline:showOnSecondary() -> Timeline
Type Method
Description Show's the Timeline on the Secondary Display.
Parameters
  • None
Returns
  • Timeline object.