Tag Selector: Metadata Mechanic vs Metadata Template. Latter is busted.

Started by MrPete, March 26, 2024, 08:59:56 PM

Previous topic - Next topic

MrPete

If I access Tag Selector in Metadata Mechanic, ALL tags are visible (ie click ... at right edge)

In Metadata Template -> Edit -> New -> Add (tag)...

Seemingly random but it is not -- it is 100% same every time...
For any given set of top level tag groups, 
  • SOME will open and have their tags
  • SOME have no tags. Nothing I can think of will make them visible. Checkboxes make no difference (and they are all visible in Tag Manager.)

Examples: apple, sanyo, samsung, app12, xmp

On those, a few that have no tags visible:
  • apple RunTime
  • sanyo MOV, MP4, Thumbnail
  • samsung INFO, MP4, sec
  • app12 PictureInfo
  • xmp PixelLive, SVG, XML

Mario

Probably you have enabled the "Show only tags with data" option. Let us know.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

MrPete

Nope. As I noted, checkboxes don't matter. (And, I do have data in those elements ;) )

MrPete

Here's a debug log the general sequence I followed:
* Opened Metadata Template settings, and explored, demonstrating the bug (see also screen caps below)
* Went to Metadata Mechanic and demonstrated no issue
* Picked a file that has app12 PictureInfo tags and showed that it's a problem even with tags (even though it shouldn't be an issue)
* Closed iMatch

And, you'll be happy to know the startup is clean, now that I'm using paid, current, iMatch ;)

Thanks!
Pete
tag select missing groups.pngHere's tag select in m'data template

tag select is fine in M mgr.pngand here in m'data mechanic

Mario

In MD templates you select a tag to write to. The tag selector does not show tags marked as read-only by ExifTool.
This is probably not respected when the MDM opens the tag selector. I will correct that.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I have fixed the issue in the MDM app. It now no longer allows to select read-only tags.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

MrPete

Hmmm... unless I am missing something (VERY likely! ;) ), now that I understand these tools, neither MM nor MT appears to do what I really need.

How close can I get to a relatively simple workflow, something like (Pete's awful pseudocode follows):

* When importing an image file (eg "Add folder")

Filter: if tag.exists(app12::PictureInformation:DateTimeOriginal) {
       Exif:DateTimeOriginal = app12::PictureInformation:DateTimeOriginal;
       Exif:Make = Olympus
       Exif:Model = D500-L
      }

I saw that Phil Harvey suggested this as an ExifTool command for a folder of such files:

Quoteexiftool "-exif:all<all" "-thumbnailimage" -make=Olympus -model=D-500L DIR
(and presumably iMatch sees that and fills in its own database, plus prepares to rewrite the data out to the files as an update?)

Mario

You can do that with a Metadata Template easily enough.
You can't just wrap everything in an if, you need the if condition for each value you assign.

Some comments:

DO NOT set physical EXIF tags directly. Always use their corresponding XMP tags. Else write-back may wipe out your changes. Use {File.MD.XMP::photoshop\DateCreated\DateCreated\0} and {File.MD.XMP::xmp\CreateDate\CreateDate\0} and similar. See How IMatch uses Date and Time Information

EXIF Make and Model are not recommended for writing and ExifTool explicitly mentions that these tags should not be touched because many RAW processors rely on them and getting them wrong will cause process issues and other problems.

You you know how to use ExifTool. you can run ExifTool from an IMatch favorite to manipulate metadata directly. See External Tool Favorites. Make sure you have written-back before to not lose metadata.

To check if a tag exists / has a value, you can use hasvalue:Text and as explained in the help, you combine this with default to create if / then / else expressions with variables.

This variable emits YES when the tag has a value, else NO

{File.MD.APP12::PictureInfo\TimeDate\DateTimeOriginal\0|hasvalue:YES;default:No Value}

In your case, you would return the correctly formatted (YYYY-MM-DD HH:MM:SS) PictureInfo timestamp in the YES case, and the existing EXIF DateTimeOriginal in the NO case. Just replace YES and NO in the variable with the corresponding variables.
Since you're a developer, I'll leave that up to you. The Variables help topic has all the info and the VarToy app allows you to try this out interactively.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook