Aperture Custom Metadata
Most cameras these days have "Maker Note" metadata stored in the EXIF fields. The normal EXIF data includes the date and time the picture was taken, and various camera settings, such as shutter speed, aperture and ISO-equivalent sensitivity. The "Maker Notes" tag contains information specific to the camera maker. The "Maker Notes" for my Nikons are different from cameras from Canon, Sony, or any other brand. In fact, the Maker Notes are different between my Nikon D200 and my Nikon D100.

There is some very useful information in the Maker Notes, such as the lens used or the auto-focus points used. This information can be very beneficial to learning from successful or failed photos, but unfortunately Aperture doesn't read this data when photos are imported. Luckily, the extremely cool exiftool will read this information, and Aperture has the capability to store custom metadata. So I set out to figure out a way to import this data that is already in my photos into the Aperture database.

The problem is that there is no easy way via Applescript to easily link a file on my hard drive with a photo in Aperture. The Applescript commands for Aperture deal exclusively with the database reference in Aperture, yet exiftool must be pointed to the actual, original photo file.

After pulling out more hair than I can afford to lose, with one failed idea after another, I stumbled across an Applescript by Brett Gross that will find the original file from a selected image in Aperture, and open a finder window that reveals the file. This script did all of the hard stuff - all I needed to do now was replace the "open finder window" stuff with the applescript needed to run exiftool on the file and stick the resulting data into Aperture.

My mission was accomplished - I got it working with my library and my naming  conventions. I posted instructions on how to use it on dpreview.com, and though it works quite well for me, there are some people that have had problems. (read the followups on the previous link) The problems seem to be due to:
 When the file name does not match the version name
 When a file has been edited in an external program (I think this is merely a subset of the above, because the external edit process makes a new "master", either TIFF or PSD, but this change in file extension makes a new name).
 When all file names are not unique. If you do not rename before import to ensure unique file names, then the routines to find images will return more than one value, and it will probably only work with the first file (or worse yet, it will pull the data from the 1st file and write it to the 2nd file). 
 When a file doesn't have EXIF data
Because I cannot anticipate everyone's naming scheme, I cannot make the required changes to the code to make this work. I would be glad update the code, downloadable here, with your fixes for these issues. (I have added comments to the code that indicates where I think the problems would be).

How to use this script:

1) Make sure that you have installed exiftool. You can get it here.

2) Load the script in Script Editor.app, found in /Applications/Applescript

3) If desired, adjust the line 

			set DesiredEXIFData to "-LensID -FocusDistance -AFMode -AFPoint 
                            -AFPointsUsed -ShootingMode -MeteringMode -Flash -FlashSetting 
                            -FlashType -FlashMode -EV -ExposureMode -ExposureProgram 
                            -LightSource"

to suit your needs - include whichever tags you desire. Running exiftool in terminal on one image will show which tags are available, but make sure you use the name without spaces. You could also find the tags available to your camera that exiftool understands 

4) Skip this step if you made no changes to the script in step 3. Compile the script. Clean up errors, if any. Save.

5) Select an image and push "run" in Script Editor.app. 

6) After a couple minutes, go back to Aperture, make sure the metadata inspector is turned on ("I" key) and click the "Other" tab at the bottom. Scroll down the list until you see "Lens ID" (assuming that was one of your fields) and see if the value looks appropriate. All other metadata you selected in step 3 should also be there.

7) If that worked, you should be able to select as many pictures as you want and run the script. It will work on all of them, but it can be slow, depending on your library size.

KNOWN ISSUES:
1) Will probably have problems if you renamed your versions after import. It should work OK if your version names are the same as your file names.
2) It will have problems if your file names are not unique! I rename before import with the date in the file name, so I don't run into this problem.
3) It seems to have problems if the file is edited in an external editor. This is actually a subset of #1, since the external edit usually changes the file format (to TIFF or PSD) and thus changes the file extension, which is part of the file name.
4) It may have problems if the file has no EXIF data (older digital cameras)

Since there are so many possible naming schemes out there that people use, it is impossible for me to implement fixes for all of them. If you come up with one, please send me the code changes and I will add them to the script. 

DISCLAIMER: I think this script is safe. If it does happen to screw something up on your system, I cannot be held responsible. Make sure you have a current vault and other backups before proceeding.
http://en.wikipedia.org/wiki/EXIFhttp://www.sno.phy.queensu.ca/~phil/exiftool/http://homepage.mac.com/brettgross/Aperture/ApertureAppleScripts/ApertureAppleScripts/RevealPhotoFile.htmlhttp://forums.dpreview.com/forums/read.asp?forum=1017&message=23341313http://allan.hise.org/downloads/ApertureCustomMetadata_1_2.dmghttp://www.sno.phy.queensu.ca/~phil/exiftool/http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/index.htmlshapeimage_3_link_0shapeimage_3_link_1shapeimage_3_link_2shapeimage_3_link_3shapeimage_3_link_4shapeimage_3_link_5shapeimage_3_link_6
Add Extra EXIF Metadata ("Maker Note") to Photos Already in Aperture Library