loonghao / photoshop-python-api

Python API for Photoshop.
https://loonghao.github.io/photoshop-python-api/
MIT License
598 stars 68 forks source link

How to revert changes? #296

Closed ulyverse closed 9 months ago

ulyverse commented 10 months ago

I would like to revert to an earlier saved state after making changes.

On javascript you can do something like this:

var savedState = app.activeDocument.activeHistoryState;
//do something
app.activeDocument.activeHistoryState = savedState;

but this doesn't work in python

savedState = app.activeDocument.activeHistoryState
#do something
app.activeDocument.activeHistoryState = savedState

it throws this error: AttributeError: can't set attribute 'activeHistoryState'

activeHistoryState appears to be readonly, is there a different way to revert back using this api? thanks!

loonghao commented 9 months ago

I deployed a new version and the issue has been solved