**Please test this script on test (duplicate) images before you use it on production images. It's still a fairly new script.**Since IMatch 5.1.14 was released most of this script is redundant. That is, most of what this script can do, IMatch can now do. (I wrote this script to propagate to only selected versions rather than all versions, but IMatch can now do that.)
You still use this script if you want to:
. Copy only keywords but not the rest of XMP; or
. Copy XMP (all of it or just keywords) and keep existing keywords in the versions being propagated to; or
. Use some combination of propagation options not available in IMatch (i.e. you use this script as a base and hack its code).
This script enables you to select some versions and propagate XMP, EXIF and IPTC to only those versions. The script itself does not propagate things that exist only in the database, such as bookmarks, flags, dots, pins, attributes, annotations - that's too much work and the native propagation is fine for that, since it doesn't change the files and their sidecars. If you also want to propagate those things then you can select the script's first option - to trigger IMatch's own propagation. This will cause IMatch to propagate whatever is configured in file relations to the selected versions.
(I made one exception to the above - this script will also propagate categories, but since IMatch 5.1.14 this isn't necessary - you can use the option to trigger native propagation to do that.)
This script assumes that you have file relations configured and working. It uses file relations to find the master, so if the versions you select don't have the little blue versions icon under the thumbnail then the script won't work (and you'll get error messages in the scripting output window).
To run the script you select the versions that to want to propagate to. (Actually, you can select any files you like to run the script on, but any that are not versions are ignored and a warning is printed to the output window.) The script locates the master for each version, it triggers Imatch propagation to the selected versions if that option is enabled, uses ExifTool to copy whichever of XMP, EXIF or IPTC you have enabled, and propagates any categories you have selected and their subcats.
Trigger propagation to these versions as per file relations - As it says, before any other actions this script can trigger Imatch to use its file relations settings to propagate metadata and collections to the selected versions.
It's up to you to ensure that there isn't any overlap between what IMatch propagates and what this script does. I'm not sure what takes precedence if there is overlap.
Copy XMP - There are options to clear XMP and to copy it. I find that clearing it before a copy is a good precaution. You can copy all XMP or just keywords. There are options to exclude ratings and labels from XMP copy - an often requested feature - and if you select this option then ratings and labels are excluded from the XMP clear command as well. You can also choose to retain existing keywords in the selected versions rather than replace them as part of the copy, and they are retained even if you select XMP Clear.
This script will search for an XMP sidecar to copy XMP from, and if it can't find it then it will use the file. However you can force it to use the file by using the "Ignore XMP sidecars and copy XMP from master file" option. In the case of CRW it looks for a .THM if it can't find the XMP sidecar.
Copy EXIF and IPTC - Like XMP, you can copy EXIF and IPTC, and it's a good idea to clear them first. But given the MWG rules, it is better to populate IPTC from XMP than to copy it, and so the script has option to run the xmp2iptc.args file.
You can assign masters and versions with successful propagations to a category for checking the outcome.
There are some built-in inclusions and exclusions:
. Hierarchical keywords are
included in the XMP clear and in the XMP copy
. Lightroom and ACR edit settings (xmp-crs) are
excluded from the XMP copy
. XMP orientation (xmp-tiff:Orientation) is
excluded from the XMP copy, since it can cause issues
. GPS (gps:all) is
included in the copy
. Only standard file types - JPG, TIFF, PSD, DNG can be propagated to - other file types are
skipped. Versions with more than one master (rare but possible) are
skipped.
. If you select category A to propagate then all its subcats will be
included in the propagation.
[attachment deleted by admin]