As far as I know there aren’t any new hooks in the underlying Photoshop file that would allow custom data (at least not according to specs). So adding that through XMP is still your best option. There’s an existing thread about this that goes into implementation details: Document XMP metadata. At the core you’d use batchPlay to retrieve and set the XMP data do the document (I don’t think there’s an API function for that yet), you parse the corresponding XML. We are doing something very similar in our pipeline to embed custom data into the File, typically just a JSON dictionary that can be as complex as needs to be. In my experience most complexity can be wrapped in functions to set and retrieve so once you have these you don’t have to deal with XMP again… Another thing to be set about the XMP hook in the file is that it’s general and I find it relatively straight forward to retrieve outside of Photoshop (i.e. you don’t have to parse the file in all detail to get to the blob that contains the XMP data).
1 Like