Add optional ability to load/save image rank property from/to xmp
sidecar "xmp.Rating" and color property from xmp "xmp.Label" ignoring
the ones provided in the processing params file.
This behavior is disabled by default and an option under settings ->
file browser has been added to enable it.
When enabled:
* On load:
* rank and color are not read from processing params.
* rank is mapped from xmp sidecar file rating entry.
* color is mapped from xmp sidecar file label entry.
* On save:
* rank and color are saved to the xmp sidecar
* rank and color are also saved to the processing param (pp3) files to
keep them in sync
Rating mapping:
Since rating can be also -1 but rank only goes from 0 to 5, the -1 value
is ignored like already done when importing from embedded xmp data.
Color mapping:
XMP has no color concept, usually programs like digikam uses the label
field to write a color name ("Red", "Orange"). The problem is that this
isn't standardized and label can be any string. Additionally Rawtherapee
has 5 specific colors while other programs can have different colors
with different name so they won't be shown if they don't map to the 5
color names supported by rawtherapee. On save only the 5 color supported
by rawtherapee wil be saved.
Trash is kept only in the profile files for multiple reasons:
* There's no trash concept in xmp, there's the rejected concept assigned
to a rating == -1.
* We could map rejected to trash but in rawtherapee rank and trash are two different values and
an image can have both rank >= 0 and trashed set to true.
Using an unique value like rating for rank and trash (when -1) will
require changing the current rawtherapee logic.
* Also digikam only handles ratings from 0 to 5 (no -1) and handles
trash in its own internal way without reflecting it in the xmp
sidecar.
This is mandatory (according to http://dpfmanager.org), and in fact needed for
Photoshop compatibility
(cherry picked from commit 5d281810cc7a7f7dc563dde030cf90c78dbf55d0)