Author Topic: Reverse Copy Ratings and Labels Script  (Read 5563 times)

Ferdinand

  • 100 years since I was shot and a war was started
  • Global Moderator
  • *****
  • Posts: 1670
Reverse Copy Ratings and Labels Script
« on: July 21, 2013, 04:32:35 PM »
[This is a port of a script I originally wrote for IMatch 3.6  It's a lot simpler in IMatch 5.] 

If you have versioning enabled, then it's possible to propagate ratings and labels from master to versions.  However I often find that it's easier to rate final, edited versions, and then I want to do a reverse propagation of the ratings.  This script will do that. 

The script works by first finding the master for the file in question, using the configured file relations, and then copying the rating / label to the master.  Then it finds all the other versions using the file relations for that master and copies the rating / label.  This script therefore assumes that all versions in a version set including the master will have the same rating.  If your workflow involves giving different ratings to different versions then you should not use this script.

As this script uses the configured file relations to find the master and the other versions, you need to have your versioning file relations created and working and refreshed in order to use this script.  You should be able to see the orange and blue master and version icons. 

The script doesn't rely on what you've configured to propagate in file relations, since the script does the reverse propagation itself, and it doesn't matter where the versions are.  Only that the file relations are configured, working and refreshed.

You can set an optional category to record all those images that had their ratings and labels changed in the last run.

This script doesn't have many options, but they're saved for the next run all the same.  As with my other IMatch 5 scripts, the settings are saved to the .pts configuration file, and a backup copy is saved to the registry.



[attachment deleted by admin]
« Last Edit: July 25, 2013, 08:01:34 AM by Ferdinand »

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 29760
Re: Reverse Copy Ratings and Labels Script
« Reply #1 on: July 21, 2013, 08:02:20 PM »
Sounds cool.  :)

cytochrome

  • Hero Member
  • ***
  • Posts: 544
Re: Reverse Copy Ratings and Labels Script
« Reply #2 on: July 24, 2013, 04:14:21 PM »
Ferdinand,

Does the master have to be in the same folder than the versions?  It doesn't work for me (tested on rating copy from jpg to Panasonic master.

I use a hierarchy like

Master folder
---------------- Bib/ASP folder
---------------- C1 folder
---------------- web folder

With the Panasonic body I cataloged the jpg because IM3 does not read/write IPTC/XMP in RW2. Do you consider extending the script (same capabilities than your IM3 script?  With a choice of using Exiftool?

I probably have to read the help about versioning, but from a first glimpse I feel that Mario did not consider propagating metadata from version ===> master. Or am I wrong?

Francis

jch2103

  • Oldtimer
  • ****
  • Posts: 2243
Re: Reverse Copy Ratings and Labels Script
« Reply #3 on: July 24, 2013, 05:13:42 PM »
When you set up Versioning, check the Versioning tab for propagation options. If I recall correctly, the default settings won't propagate much metadata.
John

Ferdinand

  • 100 years since I was shot and a war was started
  • Global Moderator
  • *****
  • Posts: 1670
Re: Reverse Copy Ratings and Labels Script
« Reply #4 on: July 24, 2013, 06:10:20 PM »
Ferdinand,

Does the master have to be in the same folder than the versions?  It doesn't work for me (tested on rating copy from jpg to Panasonic master.

I use a hierarchy like

Master folder
---------------- Bib/ASP folder
---------------- C1 folder
---------------- web folder

With the Panasonic body I cataloged the jpg because IM3 does not read/write IPTC/XMP in RW2. Do you consider extending the script (same capabilities than your IM3 script?  With a choice of using Exiftool?

I probably have to read the help about versioning, but from a first glimpse I feel that Mario did not consider propagating metadata from version ===> master. Or am I wrong?

Francis

No, the master doesn't need to be in the same folder.  I use a folder setup like yours.

It should not matter what you are propagating in your versioning file relations definition, only that the file relations are defined and working.  You can easily see whether this is the case as master files have the little blue master icon and versions have the little orange version icon and if you click on one of either kind and open the versions panel you will see the master and all versions.  If you can't see this then the script won't work.  Don't forget that you may need to refresh your file relations for all files after you edit the definitions.

The script works by first finding the master for the file in question, using the file relations, and then copying the rating / label to the master.  Then it finds all the other versions using the file relations for that master and copies the rating / label.  So you see that it doesn't rely on what you're configured to propagate, since the script does the reverse propagation, and it doesn't matter where the versions are.  Only that the file relations are configured, working and refreshed.

Francis - can you please confirm that this is the case?

cytochrome

  • Hero Member
  • ***
  • Posts: 544
Re: Reverse Copy Ratings and Labels Script
« Reply #5 on: July 24, 2013, 06:40:17 PM »
I realized that relations had to be refreshed 2 hours ago... the ticker  says 20 hours to go (yes I use a copy of a big chunk of my photo files to cover different bodies, situation, etc).

I'll be back when relations are refreshed

Francis

cytochrome

  • Hero Member
  • ***
  • Posts: 544
Re: Reverse Copy Ratings and Labels Script
« Reply #6 on: July 24, 2013, 09:11:00 PM »
Well something must be wrong..

The relations work, when I click on a master I get versions in the version panel, but masters (NEF or RW2) have the orange icon and versions the blue icon.

I am going to check my relation definitions again...

Francis

Now the script works, it copies ratings from a jpg to the master nef so it seems fine, just don't understand the icon color thing.. In fact it copies ratings from one version to the master AND to other versions of the master.

In a more general sense why one would copy ratings from a version to a master? or to all versions? If I make several versions it is in the hope that one will please me more, so different versions will be rated differently, independent from what  think of the raw. What I am really after is propagating metadata from the derived jpg into the master RW2 (and not to an xmp buddy)..

Francis

PS Just looked at the Help, seems that after all orange is standard for master and blue for version, so everything seems ok
« Last Edit: July 24, 2013, 10:36:17 PM by cytochrome »

Ferdinand

  • 100 years since I was shot and a war was started
  • Global Moderator
  • *****
  • Posts: 1670
Re: Reverse Copy Ratings and Labels Script
« Reply #7 on: July 25, 2013, 08:11:15 AM »
Now the script works, it copies ratings from a jpg to the master nef so it seems fine, just don't understand the icon color thing.. In fact it copies ratings from one version to the master AND to other versions of the master.

I got the icon colours the wrong way round.  Sorry. 

I have edited the description of the script above to make clear that the script is intended for the case where all versions have the same rating.  That's what I do.  I'm not rating the version - I rate the overall "image".  If you only want to copy the rating to the master and not to the other versions, then you could edit the script to prevent copying of the rating to other versions.

In a more general sense why one would copy ratings from a version to a master?

Since I am rating the entire version set, or the overall "image", I can't finalise that until I have seen the final product.  For a lot of my low-light work, the initial RAW thumb is not an accurate guide to the potential of the image. YMMV.

cytochrome

  • Hero Member
  • ***
  • Posts: 544
Re: Reverse Copy Ratings and Labels Script
« Reply #8 on: July 25, 2013, 10:15:31 AM »
Thanks for the clarification, we all have our own way to catalog...

In fact I am interested by the copy of selected metadata from a jpg version to the raw master, and in a selection based way. Do you have an idea how this can be achieved from within IM5? I can do it with a command line in exiftool, but this is either on a file or a whole folder.

Would be nicer in Imatch

Francis

ChrisMatch

  • Sr. Member
  • **
  • Posts: 291
Re: Reverse Copy Ratings and Labels Script
« Reply #9 on: July 25, 2013, 10:36:40 AM »
In a more general sense why one would copy ratings from a version to a master?

Since I am rating the entire version set, or the overall "image", I can't finalise that until I have seen the final product.  For a lot of my low-light work, the initial RAW thumb is not an accurate guide to the potential of the image. YMMV.
May I join this topic? I think I have a similar workflow regarding rating like Ferdinand but, having the visual proxy feature at hand, I also wondered why to rate the jpgs.
If I look at the RAW files I will see the final product (visual proxy) - so I can simply rate the RAW file and the rating gets propagated to the JPG.
(Some time ago I even thought about defining the jpg as the master to achieve something similar - but now I think this is not really necessary).

This is no criticism - I like the idea of the script - just some eagerness to learn from others  ;)

Ferdinand

  • 100 years since I was shot and a war was started
  • Global Moderator
  • *****
  • Posts: 1670
Re: Reverse Copy Ratings and Labels Script
« Reply #10 on: July 25, 2013, 10:45:22 AM »
In fact I am interested by the copy of selected metadata from a jpg version to the raw master, and in a selection based way. Do you have an idea how this can be achieved from within IM5? I can do it with a command line in exiftool, but this is either on a file or a whole folder.

You could use my script as the shell, but it will become more complex, as copying ratings and labels is fairly easy, but other metadata will need some additional coding.

Personally I'd prefer to edit the master and let it propagate. What do you what want to reverse propagate?

If I look at the RAW files I will see the final product (visual proxy) - so I can simply rate the RAW file and the rating gets propagated to the JPG.

Interesting approach.  I'm still a little uncertain about visual proxies.

ChrisMatch

  • Sr. Member
  • **
  • Posts: 291
Re: Reverse Copy Ratings and Labels Script
« Reply #11 on: July 25, 2013, 12:37:42 PM »
Interesting approach.  I'm still a little uncertain about visual proxies.
It still feels a little spooky to me - but turned out to work well until now.

cytochrome

  • Hero Member
  • ***
  • Posts: 544
Re: Reverse Copy Ratings and Labels Script
« Reply #12 on: July 25, 2013, 01:34:11 PM »
A propos the rating of JPGs, I normally don't rate raw nor jpg, but this was in the realm of  versions. Sometimes (portrait or ladscape mainly) I make several versions, B&W, low-key etc... and I would rate the "best" so it stands out in a selection. Of course it is childish for the present best may feel overdone i, a few month. But...

The reverse copying of data from jpg to raw is a problem only with RW2. I have now a PM5 version that writes metadata to the RW2.I didn't use it much because IM3 would not read it. So I have some thousands (only 3-4) RW2 with xmp sidecars. ASP, my raw converter writes the xmp contetnt to the jpg file.  I would like to write the XMP/IPTC from the jpg back to the RW2, mainly for consistency with my workflow with NEF files.

I write XMP/IPTC to the NEF since 6-7 years, and like the simplicity of it. If you (this is Ferdinand ;)) give me a hint on how to incorporate a call to exiftool from within your script I could try it. Of course if you do it... will be better done. I am only interested in the XMP/IPTC, Exif writing to the RW2 is dangerous as I learned the hard way. And the rest is handled by Imatch

Francis
« Last Edit: July 25, 2013, 01:45:01 PM by cytochrome »