Final Cut Pro version 5.1.2 and later offers support for Apple events that external applications can use to directly manage the import and export of XML in a Final Cut project.
These custom Apple events provide the following functions:
Open a project file.
Close a project file, either saving or discarding any changes.
Retrieve the XML representation of a project file.
Send XML data to Final Cut Pro directly for import.
To alert the user to changes in a project that result from these import or export operations, there are also several Apple events that control the display of project information, including:
Select a single item in the Browser and highlight it for the user.
Open individual items from the Browser into the Viewer window.
Use Final Cut's built-in Find mechanism to locate specific elements of a project.
New in Final Cut Pro 6.0.2
Final Cut Pro 6.0.2 provides new Apple Events that support the following functions:
Get a list of all open project files.
Update information about a media file.
Get an XML representation of all available effects.
Retrieve the XML representation of a single item.
Note: The Apple Developer website provides sample code that demonstrates the use of Apple events in Final Cut Pro. The sample code includes a header file you can use in constructing your own application.
kFCPProjectFileKey 'fcpP'
typeFSRef/typeFileURL
. The project file to open.kFCPProjectFileKey 'fcpP' typeFSRef/typeFileURL
. The project to close. If the project is not open, nothing happens. If no project is specified, the most recently opened file is closed.
kFCPProjectFileCloseFlagsKey 'fcCF'
typeSInt32
. A flag controlling the behavior of the close event. The possible values are:kFCPSaveAndCloseProject
- saves any changes and then closes the file.
kFCPDiscardAndCloseProject
- discards any changes and closes the file.
kFCPMediaFileKey 'fcpM' typeFSRef/typeFileURL
. The media file to examine and update.kFCPOpenProjectList 'fcOP'
. An AEList of AERecords, each of which has a kFCPOneOpenProjectFile
parameter. kFCPOneOpenProjectFile 'fcPf'
. A single path to a project file in the list of open projects. This parameter only occurs within the AEList returned by kFCPOpenProjectList
. Its value is a file FSRef.kFCPProjectFileKey 'fcpP' typeFSRef/typeFileURL
. The project to operate on.
kFCPXMLDataVersion 'xmlV' typeFloat
. The version of the Final Cut Pro XML Interchange Format to use. If unspecified, then the current version is used.kFCPXMLDataKey 'xmlD' typeUTF8Text
. The XML data for the project represented as a UTF-8 string.
kFCPProjectFileKey 'fcpP' typeFSRef/typeFileURL
. The project to operate on.kFCPItemUUID 'fcIU' typeUTF8Text
. The UUID for the item.kFCPXMLDataVersion 'xmlV' typeFloat
. The version of the Final Cut Pro XML Interchange Format to use. If unspecified, then the current version is used.kFCPXMLDataKey 'xmlD' typeUTF8Text
. The XML data for the item represented as a UTF-8 string.updatebehavior
, you can specify whether the imported items replace items in the project or are simply appended to the project. kFCPProjectFileKey 'fcpP' typeFSRef/typeFileURL
. The project to import into. If unspecified, a new untitled project is created.
kFCPXMLDataKey 'xmlD' typeUTF8Text
. The XML data to import represented as a UTF-8 string. Note this is a buffer of XML data, not a URL. See the sample code for Apple Events in Final Cut Pro.
kFCPXMLDataVersion 'xmlV' typeFloat
. An optional value controlling the version of the XML Interchange Format to use. The default is the current version.kFCPXMLDataKey 'xmlD' typeUTF8Text
. The XML data represented as a UTF-8 string. NOTE: The XML for effects cannot be imported back into Final Cut Pro.kFCPProjectFileKey 'fcpP' typeFSRef/typeFileURL
. The project file to operate on.
kFCPItemUUID 'fcIU' typeUTF8Text
. The UUID of a single item to select in the Browser.
kFCPItemsToSelectList 'fcSL' AEDescList
. A list specifying multiple items to select at the same time. The parameter is an AEList of AERecords each of which has a single kFCPItemUUID
parameter. kFCPItemUUID
parameter or a kFCPItemsToSelectList
parameter, but not both.kFCPProjectFileKey 'fcpP' typeFSRef/typeFileURL
. The project file to operate on.
kFCPItemUUID 'fcIU' typeUTF8Text
. The UUID of the item to open.
kFCPFindParameters
list contains one or more entries that compose the search criteria. You can use multiple entries to precisely control the results obtained. For example, one entry can specify that the Name column of the items must start with a string 'Camera' and the next entry specifies that the Notes column must not contain the string 'bad take'. Each criteria entry is made up of four elements: the string to search for, the way to match the string, the column to search, and whether to use matching or non-matching items. Note that each criteria entry is an AERecord, so the list consists of records, each of which contains several parameters.
kFCPProjectFileKey 'fcpP' typeFSRef/typeFileURL
. The project file to operate on.
kFCPFindLogicMode 'fndL' typeSInt32
. The logic mode for the search. You can combine search criteria using AND (all criteria apply) or OR (only one criteria need apply). Possible values are: kFCPFindLogicAnd = 0
kFCPFindLogicOr = 1
kFCPFindParameters 'fndP' typeAEList
typeAERecord
. An AEDescList list of criteria AERecords. The list is made up of one or more "criteria" records that define the string to search for, the string matching logic to use, whether to find matching items or items that don't match (i.e. 'skip'), and the name of a Browser column to search in. There are four criteria you can specify: kFCPFindSearchString, kFCPFindOmitCriteria,
kFCPFindMatchMode
and kFCPFindColumnName
.
kFCPFindSearchString 'fndS' typeUFT8Text
. The string to search for.
kFCPFindOmitCriteria 'fndO' typeSInt32
. The way the seach criteria should be used. A zero value means find items that match the search string. A non-zero value means find items that don't match the seach string. (That is, skip any item matching the search string.)
kFCPFindMatchMode 'fndM' typeSInt32
. The way a string should be matched. Valid entries are:
kFCPFindMatchStartsWith = (1 << 0)
kFCPFindMatchContains = (1 << 1)
kFCPFindMatchEquals = (1 << 2 )
kFCPFindMatchEndsWith = (1 << 3)
kFCPFindMatchLessThan = (1 << 4)
kFCPFindMatchGreaterThan = (1 << 5)
kFCPFindColumnName 'fndC' typeUTF8Text
. Restricts the search to a specific Browser column. If not specified or if the passed string is not a valid entry, then all columns are searched. Valid column names are: name, duration, in, out, start, end, scene, shottake, lognote, good, label, label2, mastercomment1, mastercomment2, mastercomment3, mastercomment4, clipcommenta, clipcommentb.
© 2003, 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-02-04)