Skip to main content
Participant
October 14, 2019
Question

Preventing Undo For a Specific Layer.

  • October 14, 2019
  • 4 replies
  • 1174 views

Hey guys, is it possible to prevent undo and redo events for a specific Photoshop layer ?

---------- It is related to Photoshop Scripting.

This topic has been closed for replies.

4 replies

Participant
October 16, 2019

Thanks a lot people. I guess erasing the history states might not be a valid option in my case. I'll be handling undo through Generator-core now. 

Chuck Uebele
Community Expert
Community Expert
October 14, 2019

My thoughts are the same as JJ"s about removing history states, but I have a feeling that you're using them in your script, otherwise the undo and redo might not be a problem.

JJMack
Community Expert
Community Expert
October 14, 2019

The only way I can think you could do that is to clear current history states and snapshots  stepping back to any history state or snapshot will revert all layers to the state they had when the snapshot or history was created.  To delete snapshots you may need to do a save, close and then reopen the document. Which will create new history with an open snapshot and a open state in the history.  All unsaved changes would also have been commited. There will be nothing to undo or redo. All layers will be committed.

JJMack
Chuck Uebele
Community Expert
Community Expert
October 14, 2019

I'm not really sure. Wouldn't putting a lock on the layer work? You should be able to disable it or enable it via scripting. What exactly are you trying to do or avoid?

Participant
October 14, 2019
Thanks a lot for the response. I have created certain layer structures through scripting. For user interaction, I have provided ways in which a user can interact with that structure. He/She can always add and delete part of the structure. I want to prevent Undo/Redo on that as it causes a lot of unnecessary issues.