The default value of all custom metadata fields is nil, and you're not able to change that. So you can use the nil value as an indicator that your plugin hasn't touched the photo.
I can't filter my catalog for nil value on custom metadata,
It is very straightforward for users and plugins to filter and search for photos with nil values in custom fields:
- In the Library Metadata browser, you can select the field, and photos with nil value will show up as "No Value".
- In smart collections, you can select the field and use the criterion "field is empty". In your plugin, you can do the equivalent by using catalog:findPhotos().
- Your plugin could do catalog:batchGetPropertyForPlugin() on a selection of photos or on all photos in the catalog. I haven't timed this for a while, but I think it goes about 3000 - 5000 photos per second.