I'm a bit confused. As Far as I can see, "Intent" is not one of the Criteria in Classic Smart Collections. Can you explain?
It's a custom metadata I defined in a plugin:
Which Plugin? Knowing that, I suspect your troubles might be with the plugin.
Seems complicated. Why not just create a parent keyword "intent" with your 3 values as child KW's? (you can set all of these to "Do not Export" when creating them.
Which Plugin? Knowing that, I suspect your troubles might be with the plugin.
This one (I omit the Info.lua):
-- MA Intent Metadata - CustomMetadataDefinition.lua
return {
metadataFieldsForPhotos = {
{
id = 'intent',
title = 'Intent',
dataType = 'enum',
browsable = true,
searchable = true,
readOnly = false,
values = {
{ value = 'Expressive', title = 'Expressive' },
{ value = 'Personal', title = 'Personal' },
{ value = 'Documentary', title = 'Documentary' },
},
allowPluginToSetOtherValues = false,
},
},
schemaVersion = 1,
}
Seems complicated. Why not just create a parent keyword "intent" with your 3 values as child KW's? (you can set all of these to "Do not Export" when creating them.
At first I considered a keyword, but I needed 3 mutually exclusive metadata values. Also, I wanted this information to be shown with my metadata, so that I can simply modify it.
For boolean metadata (e.g. marking a photo as 'private') I used a keyword as you suggested.
This one (I omit the Info.lua):
-- MA Intent Metadata - CustomMetadataDefinition.lua
return {
metadataFieldsForPhotos = {
{
id = 'intent',
title = 'Intent',
dataType = 'enum',
browsable = true,
searchable = true,
readOnly = false,
values = {
{ value = 'Expressive', title = 'Expressive' },
{ value = 'Personal', title = 'Personal' },
{ value = 'Documentary', title = 'Documentary' },
},
allowPluginToSetOtherValues = false,
},
},
schemaVersion = 1,
}
Giving a cursory glance at the Plugin Code, I do not see any problems with the code itself.. There may be other issues with how Smart Collections interact with added fields.
I agree with Dan that keywords might be a simpler approach.
Alternately, John Ellis' AnyFilter plugin might be employed to parse your "Intent" metadata field rather than resorting to a Smart Collection.
Thank you for your suggestions.
I tried setting a search on John Ellis' AnyFilter plugin, with Intent = (unknown). It works fine and it does not suffer of the issue I encountered with smart collections: i.e. reopening the "Any filter" collection, the condition is already there unchanged!
John Ellis' AnyFilter plugin is a powerful tool, that I'm using since many years, however for checking unitialized "Intent" I would prefer sticking to smart collections, because I can check at a glance if the results counter is 0. I will use a condition that does not use "No value".
Something to consider. Your Smart Collection uses "is not" Have you tried Match None and "is"?
Or {Intent}{is empty"
Actually my SC uses "Intent is No value" . I made a try with "is not", and also in this case the "no Value" is cleared if I reopen the SC.
If I keep using the No Value rule, I have to reselect No Value before saving whenever I edit the collection and Lightroom shows the blank criterion.
Otherwise I should use the equivalent condition: Intent is not Expressive AND Intent is not Personal AND Intent is not Documentary.
I also tried defining a fourth value in the enum:
values = {
{ value = nil, title = 'Not initialized"},
{ value = 'Expressive', title = 'Expressive' },
{ value = 'Personal', title = 'Personal' },
{ value = 'Documentary', title = 'Documentary' },
},
without success: the value is cleared when I reopn the SC. It seems the problem is the nil.
Also, I cannot set Intent is empty, because this choice is not available in the SC.
Since you are working with alpha characters. {Intent}{Doesn't Contain} {a e i o u}. (spaces invoke the OR between characters). Also try {Intent}{Doesn't Contain} {Expressive Personal Documentary}. (again spaces invoke the OR between phrases}
Unfortunately I can't do as you suggest. The custom metadata is of type "Enum", so the only available operations are "is" and "is not"
You're tripping over a LR bug. When you first define the smart collection with "Intent is (No Value)_", it gets defined as:
Code:
value = {
{
criteria = "sdk:com.johnrellis.slidetag.intent",
operation = "==",
},
combine = "intersect",
},But when you edit it and re-save it, it gets defined as:
Code:
value = {
{
criteria = "sdk:com.johnrellis.slidetag.intent",
operation = "==",
value = false,
},
combine = "intersect",
}You can see these representations by right-clicking a smart collection and doing Export Smart Collection Settings.
Please file a bug report with Adobe:
https://community.adobe.com/bug-reports-674/p-how-do-i-write-a-bug-report-662975
You can provide the plugin by zipping up the .lrplugin folder and attaching the .zip file to the bug report.
Thank you John!
I did forget there was the possibility to inpect the Smart Correction rules by exporting their settings. Actually I never used this command before. From the code you enclosed, it seems that LrC does build correctly the rule inside the Smart Collection dialog when the Smart Collection is reopened.
I'm going to submit the issue in the Adobe forum.
This one (I omit the Info.lua):
-- MA Intent Metadata - CustomMetadataDefinition.lua
return {
metadataFieldsForPhotos = {
{
id = 'intent',
title = 'Intent',
dataType = 'enum',
browsable = true,
searchable = true,
readOnly = false,
values = {
{ value = 'Expressive', title = 'Expressive' },
{ value = 'Personal', title = 'Personal' },
{ value = 'Documentary', title = 'Documentary' },
},
allowPluginToSetOtherValues = false,
},
},
schemaVersion = 1,
}
Out of curiosity, died you write this plug-in? If not, who is the author?
Out of curiosity, died you write this plug-in? If not, who is the author?
Yes, I wrote it. Writing a plugin for defining custom metadata is straightforward. Just follow the examples in chapter 4 of SDK.
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | I want to make a Smart Collection with 'Profile is Adaptive Color' as one of the conditions. | 0 | 10 | 18-10-2026 |
| 2 | La coleccionista | 0 | 10 | 29-08-2026 |
| 3 | 0 | 0 | 14-10-2026 | |
| 4 | 0 | 0 | 14-10-2026 | |
| 5 | 0 | 0 | 29-04-2026 | |
| 6 | 0 | 0 | 29-04-2026 | |
| 7 | 0 | 0 | 19-04-2026 | |
| 8 | 0 | 0 | 24-10-2018 | |
| 9 | Advice and Help | 0 | 10 | 15-08-2026 |
| 10 | )) | 0 | 0 | 15-08-2026 |