focal-length-sort-20130501.38.zip
· FAQ
· Version History
· Update Log via RSS
· Installation instructions
· “Donationware” Registration Info
· More Lightroom Goodies
· All-Plugin Update Log via RSS
· My Photo-Tech Posts
· My Blog

This plugin fills a specific hole in Lightroom's “Grid Filter”, adding new fields by which you can filter images: “Focal Length” and “Focal Length in 35mm”.
This plugin works in Lightroom 5, Lightroom 4, Lightroom 3, and Lightroom 2.
The same download works for both Windows and Mac. See the box to the upper right for the download link link (in orange) and installation instructions.
“Focal Length” is the raw focal length of the lens, while “Focal Length in 35mm” is viewed in terms of the frame size of a 35mm film frame. With “full frame” pro cameras these values are the same, but they differ for most cameras. The 35mm version allows one to normalize the focal-lengths across cameras, judging general “field of view” without regard to the specifics of the camera.
This is similar in concept to my “Megapixel Sort” plugin, and a more explicit way to look at focal-length data than my “Data Plot” plugin.
(Also see my powerful Data Explorer plugin, which lets you partition and group imgaes by 131 different data-related criteria, including the focal length.)
Calculating and Recalculating
Unfortunately, the Lightroom plugin infrastructure does not yet allow for custom metadata to be created and updated automatically, so as you import new images to your catalog, you must explicitly tell the plugin to calculate these custom fields.
This plugin adds two items to the File > Plug-in Extras menu, “Calculate Focal-length Sort” and “Calculate Focal-length Sort for Entire Catalog”. The former calculates the two custom-metadata values for each selected image, while the later does it for every image in the current catalog.
Note: Focal lengths less than 10mm are rounded to the nearest tenth of a millimeter. After that, focal lengths up to 200mm are rounded to the nearest millimeter, while ones beyond that are rounded to the nearest even 5mm mark.
“Sorting” By Focal Length
You can't actually sort via focal length, even using this plugin, but you can use the Library Filter to do something close. The Library Filter is in the Grid Module; use the “/” key to bring it into view if it's not already visible.
(Be sure that you've calculated the plugin metadata, as described above, prior to this step.)
In the Library Filter, select “Metadata”, then click on one of the column heads and select either “Focal Length” or “Focal Length in 35mm”, depending on you want to view the data. You should then be presented with a list of focal lengths that apply to the currently-visible images.
You can then click on one of the focal lengths to isolate only the associated images.
Availability
This plugin is distributed as “donationware”. I have chosen to make it available for free — everyone can use it forever, without cost of any kind — but unless registered, its functionality is somewhat reduced after six weeks.
Registration is done via PayPal, and if you choose to register, it costs the minimum 1-cent PayPal fee; any amount you'd like to add beyond PayPal's sliding fees as a gift to me is completely optional, and completely appreciated.
Note: a Lightroom major upgrade, such as from Lr3 to Lr4, de-registers the plugin in the upgraded version, thus requiring (if you want to maintain registration) a new (1-cent if you like) registration code in the upgraded version. It makes for a hassle every couple of years, I know. Sorry. See this note for details.
For details on plugin registration and on how I came into this hobby of Lightroom plugin development, see my Plugin Registration page.
Version History
(
Update Log via RSS
)
| 20130501.38 | Update for Lr5 |
| 20130412.37 | Build system update. |
| 20130330.36 | Added some Ricoh cameras to the crop-factor database. |
| 20130328.35 | Fix for the registration system. |
| 20130209.34 | More build-system maintenance |
| 20130206.33 | Tweak for my registration system |
| 20130124.31 | Added a bunch of Canon cameras to the crop-factor database. |
| 20120608.30 | Fix an "attempt to perform arithmetic on field" error. |
| 20120526.29 |
Update to handle the Mac App Store version of Lightroom. Tweak for Lr4.1RC2. |
| 20120428.28 | Added another Canon camera. |
| 20120413.27 |
Added some recent Canon SLRs. It's unfortunate that I have to do this, since there's a perfectly good Exif field for them to indicate the 35mm-equiv focal length, but Canon doesn't use it. Sigh. Enhanced the send-log dialog to hopefully make reports more meaningful to me, yielding, I hope, the ability to respond more sensibly to more reports. |
| 20120330.26 | Update to handle 4.1RC |
| 20120325.25 | Added a bunch of Canon compacts to the database, and fixed a few that had been incorrect. |
| 20120312.24 | Added some more cameras to the database. |
| 20120309.23 | Had broken registrations in Lr2; Update to the debug logging to better track down timing issues that might arise. |
| 20120304.22 |
More updates for Lr4. |
| 20120221.21 |
More updates for Lr4. |
| 20120131.20 |
Added a bunch of data to the crop-factor database. More on the march toward Lr4, including upheaval in the code to handle Lightroom APIs being discontinued in Lr4. |
| 20120114.19 | More tweaks for Lr4b |
| 20120112.18 |
Update for Lr4 beta: explain in the plugin manager that the plugin can't be registered in the beta. |
| 20111210.17 |
Had issues with the registration button sometimes not showing. Added a system-clock check and reports to the user if the system clock is more than a minute out of date. An incorrect system clock can cause problems with various kinds of communication and authentication with some of my plugins, so I've just gone ahead and added this to every plugin. |
| 20111030.16 |
When doing a plugin upgrade, offer the ability to flush all the old copies of the plugin. More updates to the internal crop-factor database. I really need to figure out a way to crowdsource this data. |
| 20110908.15 | A few updates to the internal crop-factor database. |
| 20110628.14 | Updated the internal crop-factor database for the Fuji X100, which doesn't seem to include its crop factor in its metadata. |
| 20100829.13 | Made the revalidation process much simpler, doing away with the silly need for a revalidation file. |
| 20100822.12 | Assume any camera-model Exif with 'scan' in it is from a film/slide scanner, and treat as a full-frame size. |
| 20100820.11 | Discovered a bug in my plugin build system that caused horribly difficult-to-track-down errors in one plugin, so am pushing out rebuilt versions of all plugins just in case. |
| 20100814.10 | Added code to allow plugin revalidation after having been locked due to a bad Lightroom serial number. |
| 20100625.9 | Yikes, shaking out some more build issues. |
| 20100624.8 | Discovered a nasty build bug; pushing a new version in case it affects this plugin. |
| 20100609.7 |
This version can be registered in Lightroom 3. It can run in Lightroom 2 or Lightroom 3; it does not work in the Lr3 betas. It uses my new registration system when run on Lightroom 3, which avoids some of the silly issues of the old one. Please take care to note the details on the registration page: use of this version (or later) of the plugin in Lightroom 3 requires a new registration code, even if you had registered some older version of the plugin. |
| 20100518.6 | Added support for the Canon 550D/KissX4/T2i, which for some reason doesn't include the 35mm-equivelant focal length in its metadata |
| 20100516.5 | Update for the Lr3 beta. |
| 20100303.4 |
Completely changed how the one-click upgrade applies the newly-downloaded zip file, in the hopes that it'll work for more people. Rather than unzipping over the old copy, it now unzips to a temporary folder, then moves the old folder out of the way and the new folder into place. Prior versions' folders are now maintained (with the version number in the folder) in case you want to revert a version; you may want to clear them out from time to time. Of course, it won't take affect until you try to upgrade after having upgraded to or beyond this version. |
| 20091205.3 | Minor internal debugging tweaks. |
| 20091126.2 | Added two more custom metadata fields, "Cropped" (yes or no) and "Post-Crop Focal Length 35mm", which indicates the effective focal length (in terms of a 35mm camera) of the crop. If there's no crop at all (or no crop on one of the sides) it's the same as "Focal Length 35mm". Otherwise, it's larger. |
| 20091124.1 | First public release. |
Hey Jeffrey,
you are really the best! You programmed this plugin that fast I can’t believe it! This is exactly what we had in Lightroom 1 and I longed for it. Manymany thanks from Berlin
Sven
I know that some people also waited for this feature in LR, so I’m gonna spread it over the forums
Great work. Again.
Well done and thank you
This function is really missing in LR
It will now be possible to have standard presets of vignetting and chromatic aberrration by range of focal and aperture
Hi Jeffrey
I forgot to mention :
do you think possible to modify the smart collection menu so we can sort photos by range of focals (between xx and yy)
For the moment we can only use “contains” etc….which, if I write “17″, selects 17mm AND 170mm ,
Logical, but not very useful
No, sorry, LR doesn’t allow for it. —Jeffrey
You seem to be reading my mind… just last weekend I was thinking of a way to convert crop to effective focal length. Thanks for yet another useful plugin!
Hi Jeffrey,
This plugin is more than welcome. Works like a charm!
Thanx, Martin
So happy to find this. Is there a way to print out the focal length breakdown that shows in the Library Filter?
Take a screenshot?
—Jeffrey
Jeffrey,
I use this plug-in and discovered that in some cases it displays a question mark (?) if the image does not have the FocalLengthIn35mmFormat label defined. Upon clicking on the ? line, the images that do not have that label are displayed (filtered). This is working as expected.
However in some cases there another entry “No Value” which is always at the bottom of the. Upon clicking that entry the line is highlighted but the filter is not engaged, the same set of pictures is displayed. Thus, I can not determine what metadata tag is involved.
This is not a big deal, but it is in all likelihood a bug that you might want to eliminate at some point.
Regards, Josh
I’m guessing that it’s a bug in LR2. Plugin custom metadata can be frustratingly iffy in LR2′s filter (try restarting LR, and it might work). Try it again in the real LR3 when it comes out and it should all work fine. —Jeffrey
Jeffrey, this issue is solved under LR 3, thanks.
Just out of curiosity: are you using the FocalLengthIn35mm EXIF variable in any way? How do you compute the value, if not? Would it be possible to write back the computed value into the metadata of the image? I am messing with a couple of small cameras that do not provide the FocalLengthIn35mm and need to massage them using exiftool. Amazingly, it is possible to at least display that variable (using your metadata config tool: ‘com.adobe.focalLength35mm’), but it is not possible to sort on it or put it in a smart collection. I was wondering if your variable is related to it and how. And again, it would be very convenient if your plugin could write back the computed value into the image (or at least into the FocalLengthIn35mm variable in the database).
– Josh
Lightroom doesn’t give access to the FocalLengthIn35mm even if the image has it, so the plugin doesn’t use it. I compute it based upon the camera make/model and a large database of sensor sizes. It would be much better if I could use FocalLengthIn35mm directly, because that would take into account camera setups that don’t use the full sensor (e.g. the high-speed crop in some Nikons). The plugin keeps the data in its info.regex.lightroom.focallengthsort.FL35 field… I’ve updated my metadata-presets plugin to work with it… but I don’t know of any way to access it via a smart collection or the like. —Jeffrey
I see. What a pity. How often can you update the database? My new little cam is apparently not in it yet (FujiFilm FinePix JZ300). When I run “Calculate focal length sort” on it, the FocalLength in 35mm changes from “No value” to “?”, I take that’s because there is no entry for it in the database.
I asked a similar question (the 35mm value is computed) on Phil Harvey’s exiftool forum and Phil replied:
The computation is based on the FocalPlaneX/YResolution tags unless the FocalLengthIn35mmFormat tag exists already in which case it is used. See the Composite tag name documentation for a list of tags used in the calculation. (Also look up the tags used in calculating ScaleFactor35efl. Note that some of these are used only if others are not available.)
Maybe one needs a LR Plugin Interface for exiftool
Thanks, Josh
Send me a sample shot (of a blank wall, or better yet, something interesting
) and I’ll add it to the database. I use ExifTool in a number of my plugins, but limitations in Lightroom and in Windows make it somewhat of a heavy hammer. Macs come with Perl installed, but Windows doesn’t and never will, so I have to include a full Perl run-time environment in the plugin, which is both fragile and bloating. And frankly, it’s not all that popular of a plugin, so I’m reticent to spend much time on it when time spent elsewhere can benefit many. —Jeffrey
Hi Jeffrey
The plug in does not work for me. I have registered and done everything you suggested.
I am using LR4. It shows me in the metadata filter all the camera, lenses and focal lenght I have used so far, but when I click on a single camera, lens or focal lenght it says that no phot match the filter.
I have calculate the focal lenght for the entire catalog, disable and enable the plug in , close LR and relaunched but nothing seems to work. Am I missing something?
thank you
You might be getting bit by a Map-related bug… visit the Map module and make sure the mapping filter is disabled, then return to Library. I think that bug is fixed in the 4.1RC. —Jeffrey
I have installed LR 4.1 and it works now
thank you
Hi Jeffrey,
I would really like to see a Lightroom plugin that crops an image according pre-defined focal lengths. When you have an image shot with a 24mm lens it is not possible to see when 35mm, 50mm, 70mm or whatever focal length, is reached during cropping. It is possible with the focal-length sort to see it but only after cropping and that is a bit laborious.
regards, Martin
Hi Jeffrey:
I just installed the Focal-Length Sort plugin, which is a godsend for me as I have used many small-sensor cameras over the years and until now have had no idea what focal length equivalent I was shooting at. After running it on my catalog, I noticed that all my Ricoh GRD2 images came up with question marks (?), which I take to mean that the GRD2 isn’t in your database. It has a fixed 28 mm equivalent lens, so a) can you add it to your database, and/or b) is there a way for me to manually edit the image files in my catalog to insert “28″ in the correct field (e.g. using an EXIF editor and then instructing LR to read the updated metadata from the file)? Thanks!
I just pushed a new version of the plugin with that camera added. —Jeffrey
BTW, I noticed your comment above that this isn’t a popular plugin. Maybe if you changed the name to better describe what it can do, more people would check it out. I would suggest calling it “Focal Length Calculator,” as IMO the calculator function is the key feature and the sort function is just a by-product. I like that the plugin a) will insert the focal length equivalent for cameras that don’t add it to the image, and b) will calculate the post-crop focal length. I am using it in combination with your metadata preset plugin to display the focal length equivalent and post-crop focal length in the metadata panel.
Hi Jeffrey:
Thanks for the quick update to include the Ricoh GRD2. I have been using the Focal Length Sort plugin together with your Data Explorer plugin to figure out what focal lengths I typically shoot at, to help in deciding which prime lens(es) to purchase. I’m not sure yet if the plugin will save me money or prompt me to spend more.
I ran into a glitch today with the plugin. I ran it on an image from a Micro 4/3 camera shot at 21 mm, and it correctly reported an equivalent FL of 42 mm. I cropped the image slightly, so it also reported a post-crop equivalent FL of 44 mm. After adjusting the image in LR, I opened it in Photoshop for some final retouching. When I later ran the Focal Length Sort plugin on the resulting TIFF file, it correctly calculated the equivalent FL as 42 mm, but calculated the post-crop FL as 42 mm also, not 44 mm as it did for the raw file. Any idea as to why it didn’t calculate the post-crop FL properly for the Photoshop image?
The trip through Photoshop removed the knowledge that the image was cropped. When you crop in Lightroom, you’re just adding a bit of metadata that you’re interested only in this sub-rectangle, but once you go through Photoshop, the crop is “baked in”, and the plugin no longer knows that it was cropped because within Lightroom, you’re seeing the whole thing. —Jeffrey
How can add more cameras to the crop-factor database?
It’s a manual process… send me the URL of the camera’s page at the manufacture and a sample image and I’ll try to add it. —Jeffrey