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

Latest commit

 

History

History
253 lines (218 loc) · 22.6 KB

plugins.finalcutpro.pasteboard.manager.md

File metadata and controls

253 lines (218 loc) · 22.6 KB

docs » plugins.finalcutpro.pasteboard.manager


Pasteboard Manager.

API Overview

API Documentation

Constants

Signature plugins.finalcutpro.pasteboard.manager.NUMBER_OF_PASTEBOARD_BUFFERS -> number
Type Constant
Description Number of Pasteboard Buffers.
Signature plugins.finalcutpro.pasteboard.manager.RESTART_DELAY -> number
Type Constant
Description How long to wait until we restart any Pasteboard Watchers in milliseconds.

Variables

Signature plugins.finalcutpro.pasteboard.manager.excludedClassnames -> table
Type Variable
Description Table of data we don't want to count when copying.
Signature plugins.finalcutpro.pasteboard.manager.WATCHER_FREQUENCY -> number
Type Variable
Description The Pasteboard Watcher Update frequency.

Functions

Signature plugins.finalcutpro.pasteboard.manager.copyWithCustomClipName() -> none
Type Function
Description Copy with custom label.
Parameters
  • None
Returns
  • None
Signature plugins.finalcutpro.pasteboard.manager.doDecodeBuffer(id) -> cp.rx.go.Statement
Type Function
Description A 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.
Signature plugins.finalcutpro.pasteboard.manager.doRestoreFromBuffer(id) -> cp.rx.go.Statement
Type Function
Description A Statement which restore a Pasteboard item from the buffer.
Parameters
  • id - The ID of the buffer item.
Returns
Signature plugins.finalcutpro.pasteboard.manager.doSaveToBuffer(id) -> cp.rx.go.Statement
Type Function
Description A Statement which saves a Pasteboard item to the buffer.
Parameters
  • id - The ID of the buffer item.
Returns
Signature plugins.finalcutpro.pasteboard.manager.doWaitForData(newData) -> cp.rx.go.Statement
Type Function
Description A Statement which waits for up to 10 seconds for new data to appear
Parameters
  • newData - The new Pasteboard data.
Returns
Signature plugins.finalcutpro.pasteboard.manager.doWaitForFreshData(oldData) -> cp.rx.go.Statement
Type Function
Description A Statement which waits for up to 10 seconds for new data to copy
Parameters
  • oldData - The original Pasteboard data.
Returns
Signature plugins.finalcutpro.pasteboard.manager.getClassname(data) -> string
Type Function
Description Gets a class anem from data
Parameters
  • data - The data object to process
Returns
  • Class name as string
Signature plugins.finalcutpro.pasteboard.manager.isTimelineClip(data) -> boolean
Type Function
Description Is the data a timeline clip.
Parameters
  • data - The pasteboard data you want to check.
Returns
  • true if a timeline clip otherwise false.
Signature plugins.finalcutpro.pasteboard.manager.ninjaPasteboardCopy() -> boolean, data
Type Function
Description Ninja Pasteboard Copy. Copies something to the pasteboard, then restores the original pasteboard item.
Parameters
  • None
Returns
  • true if successful otherwise false
  • The pasteboard data
Signature plugins.finalcutpro.pasteboard.manager.overrideNextClipName(overrideName) -> none
Type Function
Description Overrides the name for the next clip which is copied from FCPX to the specified
Parameters
  • overrideName - The override name.
Returns
  • None
Signature plugins.finalcutpro.pasteboard.manager.processArray(data) -> string, number
Type Function
Description Processes an 'array' table.
Parameters
  • data - The data object to process
Returns
  • The primary clip name as a string.
  • The number of clips as number.
Signature plugins.finalcutpro.pasteboard.manager.processContent(fcpxData, default) -> string, number
Type Function
Description Searches 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")
Signature plugins.finalcutpro.pasteboard.manager.processObject(data) -> string, number
Type Function
Description Processes 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.

| Signature | plugins.finalcutpro.pasteboard.manager.readFCPXData() -> data | nil | | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Reads Final Cut Pro Data from the Pasteboard as a binary Property List, if present. | | Parameters |

  • None
| | Returns |
  • The pasteboard data or nil.
|

Signature plugins.finalcutpro.pasteboard.manager.startWatching() -> none
Type Function
Description Start Watching the Pasteboard.
Parameters
  • None
Returns
  • None
Signature plugins.finalcutpro.pasteboard.manager.stopWatching() -> none
Type Function
Description Stop Watching the Pasteboard.
Parameters
  • None
Returns
  • None
Signature plugins.finalcutpro.pasteboard.manager.supportsContainedItems(data) -> boolean
Type Function
Description Gets whether or not the data supports contained items.
Parameters
  • data - The data object to process
Returns
  • true if supported otherwise false.

| Signature | plugins.finalcutpro.pasteboard.manager.unarchiveFCPXData(fcpxData) -> data | nil | | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Unarchive Final Cut Pro data. | | Parameters |

  • fcpxData - The data object to process
| | Returns |
  • The unarchived Final Cut Pro Pasteboard data or nil.
|

Signature plugins.finalcutpro.pasteboard.manager.unwatch(id) -> boolean
Type Function
Description Stop a watcher.
Parameters
  • id - The ID of the watcher you want to stop.
Returns
  • true if successful otherwise false.
Signature plugins.finalcutpro.pasteboard.manager.watch(events) -> table
Type Function
Description Watch events.
Parameters
  • events - Table of events
Returns
  • Table of watchers.
Signature plugins.finalcutpro.pasteboard.manager.writeFCPXData(fcpxData, quiet) -> boolean
Type Function
Description Write 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).

Fields

Signature plugins.finalcutpro.pasteboard.manager.buffer <cp.prop: table>
Type Field
Description Contains the Pasteboard Buffer.
Signature plugins.finalcutpro.pasteboard.manager.watching <cp.prop: boolean>
Type Field
Description Gets whether or not we're watching the pasteboard as a boolean.