ps v2.0.0 Release Notes
Features
Open()
Now returns the activeDocument after opening the file.
Example: Opening a document previously required this:
err := Open(/*filename*/)
if err != nil {
// Handle err
}
doc, err := ActiveDocument()
if err != nil {
// Handle err
}
now requires this:
doc, err := Open(/*filename*/)
if err != nil {
// Handle err
}
JSLayer()
Removed semicolon from the end of output.
Example:
path := "Group 1/Layer 1"
fmt.Println(JSLayer(path))
Now outputs:
app.activeDocument.layerSets.getByName('Group 1').artLayers.getByName('Layer 1')
Instead of:
app.activeDocument.layerSets.getByName('Group 1').artLayers.getByName('Layer 1');
Document
- Added FullName() which returns path to the .psd file.
- Changed Filename() to DumpFile(), as Filename was misleading.
- Dump function now saves the file as well,
to help reduce the frequency of de-syncs. - Dump function now saves json files alongside the .psds
instead of in a separate data folder- encountered issues when using
the package as a module in go 1.11beta2. - Added Save()
Testing
- Added TestDocument_Save()
- Added TestDocument_Dump()
Fixes
- DoAction now runs correctly.
Misc.
- Renamed pkgpath to pkgPath, to better fit go's standards.
- Added sweet logo made by psikoz