|
|
Log In | Not a Member? |
Contact ADC |
|
ADC Home > Reference Library > Reference > Apple Applications > Aperture > Aperture 2.1 SDK Reference
|
ApertureEditManager |
| Declared In: |
Protocol definition for the Aperture Edit interface. You should only call these methods from the main thread.
addCustomMetadata:toVersions: |
Adds the specified key-value pairs to the Custom Metadata for this image.
- (void)addCustomMetadata:(NSDictionary *)customMetadata toVersions:(NSArray *)versionUniqueIDs;
customMetadataversionUniqueIDsThis data appears in the "Other" tab in the metadata inspector. If an image already has a value for the specified key, it is updated to the new value
addHierarchicalKeywords:toVersions: |
Pass in an array of arrays specifying a keyword hierarchy.
- (void)addHierarchicalKeywords:(NSArray *)hierarchicalKeywords toVersions:(NSArray *)versionUniqueIDs;
hierarchicalKeywordsversionUniqueIDsapertureWindow |
Returns Aperture's main window
- (NSWindow *)apertureWindow;
An NSWindow.
The Edit plug-in uses this method in case it needs to present a sheet.
cancelEditSession |
Similar to -endEditSession, but automatically deletes any editable versions created by the plug-in during this session.
- (void)cancelEditSession;
Note that this method does NOT delete any versions that were edited by the plug-in, but not created during this session. This call also does not delete any referenced master files imported by the plug-in.
canImport |
Returns YES if Aperture allows the plug-in to import images into the current album; NO otherwise.
- (BOOL)canImport;
A Boolean.
For example, Aperture does not allow import into smart albums.
deleteVersions: |
Deletes the specified versions and their master files from the user's library.
- (void)deleteVersions:(NSArray *)versionUniqueIDs;
versionUniqueIDsAperture only performs this operation for versions created by the plug-in during the current session. Unique IDs for any images that were not created by the plug-in are ignored. This includes images that were already editable that the plug-in has modified. Note this call will delete master files for editable versions, whether those masters are referenced or not. However, it will only delete master files of imported versions if those files are managed (not referenced).
editableVersionIds |
Returns the unique ids that the plug-in can edit.
- (NSArray *)editableVersionIds;
An NSArray.
The array may include some images the user selected if they were already marked as editable.
editableVersionsOfVersions:requestedFormat:stackWithOriginal: |
Returns an array of unique IDs.
- (NSArray *)editableVersionsOfVersions:(NSArray *)versionUniqueIDs requestedFormat:(ApertureImageFormat)format stackWithOriginal:(BOOL)stackWithOriginal;
versionUniqueIDsformatstackWithOriginalAn NSArray. Each entry in the array contains the properties dictionary for the editable version.
If an image was already editable and the user did not want to guarantee a copy (by holding the option key when selecting the plug-in from the menu) then this method will return the unique ID passed in for that version. Otherwise, this method tells Aperture to write out an editable image in the format specified by format and creates a new entry in the user's library. Normally, the plug-in would then call the -pathOfEditableFileForVersion: for the unique IDs returned from this method, or the -propertiesWithoutThumbnailForVersion: and -thumbnailForVersion: methods.
editableVersionsOfVersions:stackWithOriginal: |
Returns an array of unique IDs.
- (NSArray *)editableVersionsOfVersions:(NSArray *)versionUniqueIDs stackWithOriginal:(BOOL)stackWithOriginal;
versionUniqueIDsstackWithOriginalAn NSArray. Each entry in the array contains the properties dictionary for the editable version.
If an image was already editable and the user did not want to guarantee a copy (by holding the option key when selecting the plug-in from the menu), then this method returns the unique ID passed in for that version. Otherwise, this method tells Aperture to write out an editable image in the format specified in the user's preferences (PSD or TIFF) and creates a new entry in the user's library. Normally, the plug-in then calls -pathOfEditableFileForVersion: for the unique IDs returned from this method, or the -propertiesWithoutThumbnailForVersion: and -thumbnailForVersion: methods.
endEditSession |
Notifies Aperture that the plug-in has completed its work.
- (void)endEditSession;
The plug-in should be ready to dealloc at the time of this call and should not be running tasks on any other threads, or anything on the run loop that may call back after this call is finished.
importedVersionIds |
Returns the unique ids of images the plug-in has imported during the session.
- (NSArray *)importedVersionIds;
An NSArray.
importImageAtPath: |
Asynchronously imports an image into the current album.
See Also:
- importImageAtPath:referenced:stackWithVersions:
- (void)importImageAtPath:(NSString *)imagePath referenced:(BOOL)isReferenced stackWithVersions:(NSArray *)versionUniqueIdsToStack;
imagePathisReferencedversionUniqueIdsToStackThis method calls the -editManager:didImportImageAtPath:versionUniqueID: method upon successful completion, or -editManager:didNotImportImageAtPath:error: if the import was unsuccessful. If -canImport returns NO, this method does nothing and the plug-in does not get a callback. The plug-in should not call -endEditSession or -cancelEditSession until it has received the import callback.
importImageAtPath:referenced:stackWithVersions: |
Asynchronously imports an image into the current album.
See Also:
- importImageAtPath:
- (void)importImageAtPath:(NSString *)imagePath referenced:(BOOL)isReferenced stackWithVersions:(NSArray *)versionUniqueIdsToStack;
imagePathisReferencedversionUniqueIdsToStackThis method calls the -editManager:didImportImageAtPath:versionUniqueID: method upon successful completion, or -editManager:didNotImportImageAtPath:error: if the import was unsuccessful. If -canImport returns NO, this method does nothing and the plug-in does not get a callback. The plug-in should not call -endEditSession or -cancelEditSession until it has received the import callback.
pathOfEditableFileForVersion: |
Returns the path to the file that the plug-in should read/write for this version.
- (NSString *)pathOfEditableFileForVersion:(NSString *)versionUniqueID;
versionUniqueIDAn NSString
This path is also available via the properties dictionary, but if this version is not editable, the method returns nil.
propertiesWithoutThumbnailForVersion: |
Accesses all the available properties for the specified image.
- (NSDictionary *)propertiesWithoutThumbnailForVersion:(NSString *)versionUniqueID;
versionUniqueIDAn NSDictionary
A thumbnail image is not included. You can obtain a thumbnail using the method -thumbnailForVersion:.
selectedVersionIds |
Returns the unique ids of the versions the user selected in Aperture.
- (NSArray *)selectedVersionIds;
An NSArray.
The IDs are ordered in the same order that the user selected them, except the primary selection is always first.
setUserDefaultsValue:forKey: |
Sets the users preferences values.
- (void)setUserDefaultsValue:(id)value forKey:(NSString *)key;
valuekeyWrites preferences values into a preferences file specific to the plug-in, not Aperture's preferences file.
thumbnailForVersion:size: |
Returns the thumbnail for an image.
- (NSImage *)thumbnailForVersion:(NSString *)versionUniqueID size:(ApertureExportThumbnailSize)size;
versionUniqueIDsizeAn NSImage.
Some plug-ins may choose to operate on the large thumbnail and not request an editable version of the image until the user is done.
userDefaultsObjectForKey: |
Reads the specified user preferences values.
- (id)userDefaultsObjectForKey:(NSString *)key;
keyid
Reads the specified preferences values from a preferences file specific to the plug-in, not Aperture's preferences file.
|