The Photoshop team has been working hard on opening up new UXP APIs! The new APIs are available in prerelease, and more are being added each month.
prerelease changelog is available publically Moved to here: https://developer-stage.adobe.com/photoshop/uxp/2022/ps_reference/changelog/ (as of Oct 7, 2021) I’m sharing it here just in case any of the new APIs will help developers in the community start building or start migrating from CEP. Here’s this month’s list:
Updated DOM API#
- We’re introducing collection classes built using Proxies, to make it easier to interact with the DOM.
- Try iterating through all the documents as such:
app.documents.forEach(h => console.log(h.title));
- HistoryStates collections and HistoryState API
- We’ve built HistoryStates to mirror ExtendScript functionality.
getByName(name)are provided. You can also use indices as such:
- HistoryState provides
- Documents collections
- Documents also follows ExtendScript functionality.
- Constants module, collecting all enumerations and constants used in DOM API. Accessible via
- Updated app.createDocument / app.add
- Create a document with no params for a default document, with a predefined preset, or by providing a host of DocumentCreateOptions).
- Updated document.save and document.saveAs
saveno longer infers the file type from the requested file name. Instead, it invokes a save dialog for unsaved files, and performs a save operation for saved, modified files.
saveAsis provided for
psdformats. Use SaveOptions objects to request specific saves (e.g. PhotoshopSaveOptions).
- layer.id getter
- Updated document.createLayer and document.createLayerGroup
Photoshop Core updates#
- Execute as Modal allows you to create plugins that can be guaranteed exclusive control over Photoshop during execution. It further allows for clear user feedback when this is occuring, and allows plugins to
If you’re not part of the Photoshop prerelease group, email me ( finnegan at adobe.com) or DM me with the email address associated with your AdobeID.