This is a wrapper module for Photoshop Generator, an Adobe Node.js based extension technology for Photoshop, which allows a real time updates and export of changes in a PSD-file.
For more information about creating Photoshop plugins see https://github.com/adobe-photoshop/generator-core
Package photoshop-generator-core functions as a wrapper for the Generator APIs delivering
- An abstraction for the internal data types
- Cache and an easy access for layer data
- Extendible HTTP server for communicating with Photoshop panels, local apps and cloud services
- Convenience functions for accssing e.g.
- Layer data
- Layer changes
- Files and directories
- Photoshop
- Operating system
- HTTP methods
Photoshop Generator Core offers the following method collections for interacting with Photoshop
- plugin: configure and manage plugin
- photoshop: interact with Photoshop
- layer: access Photoshop layers
- document: access Photoshop documents
- delta: helper functions for testing what changes have occured
- server: create a local webserver to interact with Photoshop panels
- file: access filesystem files
- directory: access filesystem directories
- http: make http requests
- system: access operating system
- json: JSON encode/decode
- log: logging
- png: export layer content as PNG's
- util: utility functions
There is sample Generator plugin about using photoshop-generator-core that enables HTTP access to Photoshop:
- Github: https://github.com/pragmatta/photoshop-generator-sample
- NPM: https://www.npmjs.com/package/photoshop-generator-sample
- Fixed layer deletion not removing the data
- Fixed some changes in document corrupting original data
- Added new method documentCount for getting the document count
- Added option count to layerGetNextLayer/layerGetPreviousLayer
- Added new method documentGetSelectedLayers for getting a collection of selected layers
- Fixed layer order management. Photoshop sometimes skips index change events and its detected and document data refetched when it happens
- Added layerGetDepth
- New methods layerGetNextLayer and layerGetPreviousLayer for finding the next/previous entry in the layer list
- Cleaned up debug printing
- Fixed layerdata indexing (e.g. used by layerGetByIndex)
V4.0.1 is a backwards incompatible change to v3.x and will require code changes
- Changed the format of the serverSetRequestHandler callback to support body data and different kinds API structures. The new callback gets following parameters:
- Path: Array of strings of the request path split by '/'
- Params: Object of the URL-parameters
- Body: HTTP body data
- Request: http.ClientRequest Node-object
- Response: http.ServerResponse Node-object
- Changed layer UID-format from the simple "DOC_ID:LAYER_ID" to a proper URNs "document:DOC_ID" and "layer:DOC_ID:LAYER_ID"