#plugins.finalcutpro.pasteboard.manager

Pasteboard Manager.


#API Overview

Constants - Useful values which cannot be changed

Variables - Configurable values

Functions - API calls offered directly by the extension

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


#API Documentation

#Constants

Signatureplugins.finalcutpro.pasteboard.manager.NUMBER_OF_PASTEBOARD_BUFFERS -> number
TypeConstant
DescriptionNumber of Pasteboard Buffers.
NotesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 67

Signatureplugins.finalcutpro.pasteboard.manager.RESTART_DELAY -> number
TypeConstant
DescriptionHow long to wait until we restart any Pasteboard Watchers in milliseconds.
NotesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 72

#Variables

Signatureplugins.finalcutpro.pasteboard.manager.excludedClassnames -> table
TypeVariable
DescriptionTable of data we don't want to count when copying.
NotesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 77

Signatureplugins.finalcutpro.pasteboard.manager.WATCHER_FREQUENCY -> number
TypeVariable
DescriptionThe Pasteboard Watcher Update frequency.
NotesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 62

#Functions

Signatureplugins.finalcutpro.pasteboard.manager.copyWithCustomClipName() -> none
TypeFunction
DescriptionCopy with custom label.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 271

Signatureplugins.finalcutpro.pasteboard.manager.doDecodeBuffer(id) -> cp.rx.go.Statement
TypeFunction
DescriptionA Statement which decodes the buffer with the specified ID.
Parameters
  • id - The ID to decode
Returns
  • A Statement that sends the decoded buffer, or throws an error if not available.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 601

Signatureplugins.finalcutpro.pasteboard.manager.doRestoreFromBuffer(id) -> cp.rx.go.Statement
TypeFunction
DescriptionA Statement which restore a Pasteboard item from the buffer.
Parameters
  • id - The ID of the buffer item.
Returns
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 622

Signatureplugins.finalcutpro.pasteboard.manager.doSaveToBuffer(id) -> cp.rx.go.Statement
TypeFunction
DescriptionA Statement which saves a Pasteboard item to the buffer.
Parameters
  • id - The ID of the buffer item.
Returns
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 551

Signatureplugins.finalcutpro.pasteboard.manager.doWaitForData(newData) -> cp.rx.go.Statement
TypeFunction
DescriptionA Statement which waits for up to 10 seconds for new data to appear on the clipboard. If none is found, an error is sent.
Parameters
  • newData - The new Pasteboard data.
Returns
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 531

Signatureplugins.finalcutpro.pasteboard.manager.doWaitForFreshData(oldData) -> cp.rx.go.Statement
TypeFunction
DescriptionA Statement which waits for up to 10 seconds for new data to copy to the clipboard. If none is found, an error is sent.
Parameters
  • oldData - The original Pasteboard data.
Returns
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 511

Signatureplugins.finalcutpro.pasteboard.manager.getClassname(data) -> string
TypeFunction
DescriptionGets a class anem from data
Parameters
  • data - The data object to process
Returns
  • Class name as string
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 162

Signatureplugins.finalcutpro.pasteboard.manager.isTimelineClip(data) -> boolean
TypeFunction
DescriptionIs the data a timeline clip.
Parameters
  • data - The pasteboard data you want to check.
Returns
  • true if a timeline clip otherwise false.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 87

Signatureplugins.finalcutpro.pasteboard.manager.ninjaPasteboardCopy() -> boolean, data
TypeFunction
DescriptionNinja Pasteboard Copy. Copies something to the pasteboard, then restores the original pasteboard item.
Parameters
  • None
Returns
  • true if successful otherwise false
  • The pasteboard data
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 673

Signatureplugins.finalcutpro.pasteboard.manager.overrideNextClipName(overrideName) -> none
TypeFunction
DescriptionOverrides the name for the next clip which is copied from FCPX to the specified value. Once the override has been used, the standard clip name via mod.findClipName(...) will be used for subsequent copy operations.
Parameters
  • overrideName - The override name.
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 258

Signatureplugins.finalcutpro.pasteboard.manager.processArray(data) -> string, number
TypeFunction
DescriptionProcesses an 'array' table.
Parameters
  • data - The data object to process
Returns
  • The primary clip name as a string.
  • The number of clips as number.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 125

Signatureplugins.finalcutpro.pasteboard.manager.processContent(fcpxData, default) -> string, number
TypeFunction
DescriptionSearches the Pasteboard binary plist data for the first clip name, and returns it.
Parameters
  • fcpxData - The data object to process
  • default - The default value
Returns
  • Returns the 'default' value if the pasteboard contains a media clip but we could not interpret it, otherwise nil if the data did not contain Final Cut Pro Clip data.
Notes
  • Example usage: local name = mod.findClipName(myFcpxData, "Unknown")
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 226

Signatureplugins.finalcutpro.pasteboard.manager.processObject(data) -> string, number
TypeFunction
DescriptionProcesses the provided data object, which should have a '$class' property.
Parameters
  • data - The pasteboard data you want to check.
Returns
  • The primary clip name as a string.
  • The number of clips as number.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 100

Signatureplugins.finalcutpro.pasteboard.manager.readFCPXData() -> data | nil
TypeFunction
DescriptionReads Final Cut Pro Data from the Pasteboard as a binary Property List, if present.
Parameters
  • None
Returns
  • The pasteboard data or nil.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 290

Signatureplugins.finalcutpro.pasteboard.manager.startWatching() -> none
TypeFunction
DescriptionStart Watching the Pasteboard.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 411

Signatureplugins.finalcutpro.pasteboard.manager.stopWatching() -> none
TypeFunction
DescriptionStop Watching the Pasteboard.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 487

Signatureplugins.finalcutpro.pasteboard.manager.supportsContainedItems(data) -> boolean
TypeFunction
DescriptionGets whether or not the data supports contained items.
Parameters
  • data - The data object to process
Returns
  • true if supported otherwise false.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 148

Signatureplugins.finalcutpro.pasteboard.manager.unarchiveFCPXData(fcpxData) -> data | nil
TypeFunction
DescriptionUnarchive Final Cut Pro data.
Parameters
  • fcpxData - The data object to process
Returns
  • The unarchived Final Cut Pro Pasteboard data or nil.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 311

Signatureplugins.finalcutpro.pasteboard.manager.unwatch(id) -> boolean
TypeFunction
DescriptionStop a watcher.
Parameters
  • id - The ID of the watcher you want to stop.
Returns
  • true if successful otherwise false.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 388

Signatureplugins.finalcutpro.pasteboard.manager.watch(events) -> table
TypeFunction
DescriptionWatch events.
Parameters
  • events - Table of events
Returns
  • Table of watchers.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 361

Signatureplugins.finalcutpro.pasteboard.manager.writeFCPXData(fcpxData, quiet) -> boolean
TypeFunction
DescriptionWrite Final Cut Pro data to Pasteboard.
Parameters
  • fcpxData - The data to write
  • quiet - Whether or not we should stop/start the watcher.
Returns
  • true if the operation succeeded, otherwise false (which most likely means ownership of the pasteboard has changed).
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 341

#Fields

Signatureplugins.finalcutpro.pasteboard.manager.watching <cp.prop: boolean>
TypeField
DescriptionGets whether or not we're watching the pasteboard as a boolean.
NotesNone
Sourcesrc/plugins/finalcutpro/pasteboard/manager.lua line 504