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.
Update the media file.
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.
Final Cut Pro 6.0.2 provided Apple Events in support of 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.
New in Final Cut Pro 7.0
Final Cut Pro 7.0 provides new Apple Events that support the following functions:
Save a specified project file.
Get a table of contents (bins, clips, sequences) for a specified project.
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.
kFCPProjectFileKey 'fcpP'. The project file to save (FSRef).kFCPProjectFileURL 'fcpU'. The name and location for the saved project file (file url).kFCPProjectFileOverwriteFlag 'fsOF'. An optional Boolean flag controlling overwriting. TRUE means Final Cut Pro overwrites a project file with the same name and location; FALSE means Final Cut Pro cancels the save operation if a project exists with the same name and location. The default setting is FALSE.kFCPProjectFileKey 'fcpP' . The project file to list.kFCPXMLDataKey 'xmlD'. An XML stream listing out a 'table of contents' for the project. Each listing includes the name, uuid, duration, and rate information for the specified item. 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. If you omit this parameter and specify a UUID parameter only, Final Cut looks for the item in the front-most project.kFCPItemUUID 'fcIU' typeUTF8Text. The UUID for the item. If you omit this parameter and specify a project that is open, Final Cut returns the XML for the front-most sequence, whether this sequence is in the specified project or not. If you omit this parameter and specify a project that is closed, Final Cut opens the project, makes any open sequence in that project front-most, and returns the XML for that sequence.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.kFCPMediaFileKey 'fcpM' typeFSRef/typeFileURL. The media file to examine and update.kFCPUpdateFileIgnoreModDate 'fIMD'. An optional Boolean flag controlling updating. TRUE means Final Cut Pro updates the media file regardless of its modification time; FALSE means Final Cut Pro updates the media file only if it has changed since the last time Final Cut examined the file. The default setting is FALSE.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.
Last updated: 2009-07-23