Integration into Lightroom 5

Started by rsirota, December 28, 2013, 11:24:36 PM

Previous topic - Next topic

rsirota

First off let me say I love this tool!!!

However, is there a way that I can get it to run when importing my images into Lightroom and add some of the fields I want to the exif data? or even add it to a text block stored in the Exif block? I am on a mac as well as a software engineer so I can do it if it is possible... But if you have something that would work that would kick butt... I am most interested in the settings for my off camera speedlight data.

Commander Channel               : 1
Commander Internal Flash        : Off
Commander Internal Manual Output: Full
Commander Group A Mode          : Manual
Commander Group A Manual Output : 0.8
Commander Group B Mode          : TTL
Commander Group B Manual Output : Full
Modeling Flash                  : On
Commander Internal TTL Comp     : 0
Commander Group A TTL-AA Comp   : 0
Commander Group B TTL-AA Comp   : 0

Fox example...

Thanks again
Rob

Phil Harvey

Hi Rob,

Sorry for the delay in responding.

This can be done in a number of ways.  The recommended way would be to create user-defined XMP tags for all of the extra information you want to add.  (See the sample config file for examples.)  You could use a text block, but I don't think that unstructured data like this would be as easy to use.  However, a command to do this could be:

exiftool "-commander*" -modelingflash some.jpg | exiftool "-comment<=-" some.jpg

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Beholder3

A photo forum moderator once wrote a small LR plugin which during import fixes the metadata of the Sigma 8-16mm lens for Pentax based on the tags I gave him.
I just had a look at it and it seems that LR-Plugins are way more simple to create than I thought. There are just two whatvevername.lua files and these ".lua" files actually are plain text files with the extension changed.

Here is the contant of the plugin:
local LrTasks = import 'LrTasks'
local LrApplication = import 'LrApplication'

local catalog = LrApplication.activeCatalog()
    local cat_photos = catalog.targetPhotos   
        for i, photo in ipairs(cat_photos) do
            local file = photo.path
                LrTasks.startAsyncTask(function()
                    LrTasks.execute("exiftool -m -overwrite_original_in_place '-exif:FocalLength<copy2:FocalLength' '-exif:LensModel<makernotes:LensType' '-XMP:Lens<makernotes:LensType' '-exif:FocalLengthIn35mmFormat<Lightroom35mm' '-exif:LensInfo<LensID' '"  ..file..  "'")
                end)
end


Seems to me that even myself would be able to "program" a similar plugin to execute any exiftool command on import. Just need to replace the text there as it seems.

I gues the smartest way would be to try to have this run an external command set file which the user can change directly without needing to touch the plugin with the -@ ARGFILE command.

I have to think about it, but it seems that this really is something I have been looking for quite some while. Nice.

For running exiftool during export there is this little plugin call full meta export: http://chaoliu12.wordpress.com/fullmetaexport-lightroom-plugin/
I use it to have a finetuned minimal set of metadata in my published pictures.



reisschuessel

Quote from: Beholder3 on January 01, 2014, 12:13:49 PM
A photo forum moderator once wrote a small LR plugin which during import fixes the metadata of the Sigma 8-16mm lens for Pentax based on the tags I gave him.
This was actually me.  :)
I just stumbled upon this thread while researching another issue.

But the plugin is a post-import plugin. As far as i know it is not possible to invoke a plugin during import.
The difference in your workflow isn't that big wether you use a plugin of this kind during or just after import.
Quote from: Beholder3 on January 01, 2014, 12:13:49 PM
Seems to me that even myself would be able to "program" a similar plugin to execute any exiftool command on import. Just need to replace the text there as it seems.
Using a similar plugin after the import is finishede, might be a possibility to change the exifdata as asked by the thread opener.
Just altering the exiftool line should do the job.

There are some limitations: the plugin does not show any indication of what it is doing -> no progress bar or dialog when the task is finished. (I am lackin quite some skill in this area of lua-scripting)
Additionally you have to re-read the metadata after the plugin finishes, as the metadata is changed externally by exiftool.
Niels

500px: 500px.com/oejeblikket