Hide versions won't hide images with buddy files

Started by dansken, August 16, 2022, 02:23:37 PM

Previous topic - Next topic

dansken

When browsing images by selecting a folder in 'Media and Folders', I would love to be able to hide versions, even if those files do have buddy files. Is there a trick I'm not aware of, or another way of accomplishing this?

List of files:
DSC_0980.JPG.xml
DSC_0980.NEF
DSC_0980.JPG
DSC_0980.XMP
DSC_0980_crop.jpg
DSC_0980_crop.jpg.xml
DSC_0980_sharp.jpg
DSC_0980_sharp.jpg.xml
DSC_0980_unsharp.psd

Buddy files are defined like this:
JPG Masters
Link via: File Name
Master Expression: \.(jpg)$
Replacement Expression: ^_*//
Link Expression: ^(_*{name})\.(jpg.xml|xml|nks|jpeg|dng|tif|psd|nef|nef.dxo|nef.bib|nef.dop)$

Versions are defined like this:
[V] JPG Versions
Link via: File Name
Master Expression: ^........\.(jpg)$
Replacement Expression: ^_*//
Link Expression: ^(_*{name}).+\.(nks|jpg|jpeg|dng|tif|psd|nef|nef.dxo|nef.bib|nef.dop)$

Selecting 'Hide buddy files' in the filter panel, results in these files being shown (as expected):
DSC_0980.JPG
DSC_0980_crop.jpg
DSC_0980_sharp.jpg
DSC_0980_unsharp.psd

Selecting 'Hide buddy files' and 'Hide versions' in the filter panel results in these files being shown:
DSC_0980.JPG
DSC_0980_crop.jpg
DSC_0980_sharp.jpg

I would have expected the last two files to be hidden as well, as they are versions of DSC_0980.JPG (and {File.Relations.IsVersion}=1), but that is not happening because they have .xml buddy files.

I tested deleting the .xml buddy files and rescanning the folder, which results in only DSC_0980.JPG being shown (which is what I want) ... however those files are automatically generated by some gallery creation software that I am using, so deleting them all is not an easy option.

Is there something I am missing?

Mario

I guess, somethings things are too complex, even for IMatch. Sorry.
Or a situation is so rare, that implementing a solution for it would be possible, but would cause performance degradation for all users in order to support a fringe case for a handful of users.

You are basically "stacking/merging" versions and buddy files, and the hide buddy files considers only buddy files seen at the first pass.
If you hide versions, they may "vanish" from the scope before the hide buddy files filter is applied, and this filter thus does not find any buddy files to hide (since the versions to which the buddy files belong have already be filtered out). Probably the same happens when a user hides masters and hides buddy files, and the masters are filtered from the scope before the "hide buddy files" filter is applied.

I could probably implement a solution for this particular combination of version / buddy / filter combination, but how many users will ever run into a situation and combination of relations and filters?
Maybe you can hide the buddy files via a file name filter?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

dansken

Digging through the forum, I didn't see anyone with my exact problem ... but a few threads pointed me in the right direction and I am happy to report that I found two solutions to my issue:

Filter on Collections -> Relations -> Version (invert the filter) successfully hides all versions, even those that have buddy files.

Filter on Variable {File.Relations.IsVersion} = 0 successfully hides all versions, even those that have buddy files.

As mentioned, I was surprised that the filter "File properties: Hide versions" didn't accomplish the same, but happy to have found a way to make it work. iMatch is certainly a very flexible piece of software, with options that fits a lot of different workflows.

I noticed a warning somewhere, that filtering on Variable may lead to poor performance in some cases (thousands of images). Is filtering on Collection -> Relations the better option?

Mario

#3
QuoteI noticed a warning somewhere, that filtering on Variable may lead to poor performance in some cases (thousands of images). Is filtering on Collection -> Relations the better option?

Yes. It depends. If your scope is only a few thousand files, there is not much of a difference. If your scope has tens of thousands of files, it might.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I could reproduced this problem using the same file layout and overlapping versions/buddy files.
The versions were not correctly identified by the filter in this case. The reason was a shortcut method in the database which did not correctly identify buddy files.

I have fixed that for the next release.
Thank you for bringing this to my attention.
I will move this thread to the solved bug reports board now.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

dansken

Thank you very much for looking into this and for continuing to improve iMatch! Using the File Properties filter to hide buddy files and versions is so convenient!