Is possible to save plugin settings as a smartObj filter?

I’ve seen that “filter” plugins written in C/C++ save their settings inside a “smart filter” in a “Smart Object layer”.

Is it possible to do the same with UXP? Somehow I want to save my plugin settings in a layer so user can go back a edit the settings whenever he wants, making it non-destructive workflow.

Have you considered embedding your settings/data as XMP metadata on the document (or layer)?

Is it possible to embed xmp metadata to a layer? Can’t find documentation about it

There is, but as recently brought up in this post, seems to have a bug. If you need to associate your information with a particular layer then a workaround could be to store your information under document XMP metadata but indexed by layer ID (which stays constant over the lifetime of a layer).

1 Like

I just saw some davides solutions, but seems I cannot make work NodeJs in my UXP main.

There is an API for this. Here are the docs. There’s examples in this post.

I use this approach as a solution in one of my plugins. Yes, it sets XMP data to a document, but I use layer IDs in that data to know which layer has what settings.

1 Like