#plugins.finalcutpro.browser.layouts

Allows you to save and restore Browser Layouts.

This plugin creates two different types of actions:

Save/Restore Browser Layout to Memory This feature allows you save and restore five custom browser layouts, which can be easily triggered by a CommandPost action, such as a keyboard shortcut.

Save/Restore/Set Browser Layout for Selected Collection* This feature allows you to save a browser layout for the currently selected collection. This feature will only work if a single collection (either Keyword Collection or Smart Collection) is selected - if more than one is selected then you'll just hear an error beep. Once you save a browser layout, then the next time you click on the collection with your mouse, your previously saved browser layout will be automatically restored. Browser layouts are only automatically loaded when you use your mouse - collection layouts won't be loaded if you change collections using keyboard shortcuts. You can also temporarily prevent a browser layout from automatically loading by holding down the OPTION key.

Developer Note: This plugin currently uses a hs.eventtap rather than AX Notifications, because in testing we found the AX Notifications to be too unreliable. We also opted to just use the collection name as the reference point, rather than the path to the collection name (i.e. "Edits" instead of "Library Name > Event Name > Folder Name > Collection Name") so that browser layouts can easily be common across multiple libraries (i.e if you always have a Smart Collection called "Edits", then this smart collection will always have the same browser layout across all your libraries.

We're also currently using the menu position for selecting "Show/Hide All Columns" as the strings for these values are contained within a .nib file not a .strings file.


#API Overview

Variables - Configurable values

Functions - API calls offered directly by the extension


#API Documentation

#Variables

Signatureplugins.finalcutpro.browser.layouts.busy -> boolean
TypeVariable
DescriptionAre we already in the process of doing something?
NotesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 78

Signatureplugins.finalcutpro.browser.layouts.lastCollection -> string | nil
TypeVariable
DescriptionThe last collection registered.
NotesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 681

#Functions

Signatureplugins.finalcutpro.browser.layouts.getActiveColumnsNames() -> table
TypeFunction
DescriptionGet active column names in a table.
Parameters
  • None
Returns
  • A table of active column names or an empty table if something goes wrong.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 155

Signatureplugins.finalcutpro.browser.layouts.getClipNameSize() -> string | nil
TypeFunction
DescriptionGets the Clip Name Size as a string.
Parameters
  • None
Returns
  • The Clip Name Size as a string or nil if cannot be found.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 134

Signatureplugins.finalcutpro.browser.layouts.getSingleSelectedCollection() -> string | nil
TypeFunction
DescriptionIf a single collection is selected in the browser it's value is returned as a string.
Parameters
  • None
Returns
  • A string if successful otherwise nil.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 577

Signatureplugins.finalcutpro.browser.layouts.resetBrowserLayoutForSelectedCollection() -> none
TypeFunction
DescriptionReset Browser Layout for selected collection.
Parameters
  • None
Returns
  • None
Notes
  • An error sound will play if there's nothing to reset.
ExamplesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 657

Signatureplugins.finalcutpro.browser.layouts.restoreBrowserLayoutForSelectedCollection() -> none
TypeFunction
DescriptionRestore Browser Layout for selected collection.
Parameters
  • None
Returns
  • None
Notes
  • An error sound will play if there's nothing to restore.
ExamplesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 595

Signatureplugins.finalcutpro.browser.layouts.restoreLayoutFromTable(layout) -> boolean
TypeFunction
DescriptionRestore Layout from Table.
Parameters
  • layout - The layout settings in a table.
Returns
  • true if successful otherwise false
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 181

Signatureplugins.finalcutpro.browser.layouts.saveBrowserLayoutForSelectedCollection() -> none
TypeFunction
DescriptionSave Browser Layout for selected collection.
Parameters
  • None
Returns
  • None
Notes
  • An error sound will play if there's nothing to save.
ExamplesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 630

Signatureplugins.finalcutpro.browser.layouts.saveLayoutToTable() -> table | boolean
TypeFunction
DescriptionSave Layout to Table.
Parameters
  • None
Returns
  • A table containing the layout settings if successful otherwise false.
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 435

Signatureplugins.finalcutpro.browser.layouts.setupWatcher() -> none
TypeFunction
DescriptionCreates or destroys the keyboard watcher.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/finalcutpro/browser/layouts.lua line 83