Another from couple questions which accumulated over time.
If I modify layer in document by adding or updating XMP metadata, the document itself is not modified (does not enable save), so far if document is closed without doing some other action which marks document as modified, data are lost.
Question: how to either force document to see changes in XMP meta or how to mark document as modified?
activeDocument.activeLayer.xmpMetadata.rawData = meta.serialize();
When you ask app-specific questions, you should really specify the app you are referring to.
I'm guessing you are talking about Photoshop. This seems to be a scripting related question, and you'll probably get better answers on the Photoshop forum: http://forums.adobe.com/community/photoshop/photoshop_scripting
One more note, this works unless you call this on background or locked layer. IMHO, the better way would to modify the isDirty (true|false) property on document using appropriate Action. I found the property now as long as did some dump of ActionDescriptor on Document. Btw., if you have snippet for building Action, it'll save me some time .
Europe, Middle East and Africa