This is set of helper functions for extend scripts that run into Adobe Photoshop.
This code is under development, thus the signature of functions may varay from version to version.
npm install ps-scripting-tools
Adds UI elements to window object.
Aligns layer with active selection boundaries.
Binds watchers on object properies. Callbacks will fire when value of the property changes.
Gets the value of ** Edit > Preference > Resize Image During Place **.
Get extension from uri like string.
Seek files with given extensions in folder, and return them as an array of files.
Return array of subfolders (one level down) in given folder.
Detects if layer has layer mask.
Links or unlinks Layer with its Layer Mask.
Places file in active document as smart object.
Replaces content of smart object.
Resizes document.
Sets the value of ** Edit > Preference > Resize Image During Place **.
Sets ** dpi ** in specified document. Do not change it actual size in pixels.
Makes layer Mask from active selection.
Disables or enables layers mask if present.
Set active selection acording to layers bitmap or layers mask.
Copies Layer Style (Drop shadow e.t.c.) from one layer to another.