03-08-2023, 11:57 PM
(This post was last modified: 03-08-2023, 11:57 PM by BaconWizard17.)
Is it possible to have a script that can undo its own actions in the middle of operating? For example:
- An image with layers A, B, and C
- Hide layer C
- Flatten image
- Export image
- Undo the flattening and hiding to get the image back to its original state
- Hide layer B
- Flatten image
- Export image
I know that undo groups can be used to manually undo several steps of a script simultaneously after the script runs, but I wasn't sure if the script could undo its own actions automatically (mainly irreversible ones, like flattening the image or indexing colors).
- An image with layers A, B, and C
- Hide layer C
- Flatten image
- Export image
- Undo the flattening and hiding to get the image back to its original state
- Hide layer B
- Flatten image
- Export image
I know that undo groups can be used to manually undo several steps of a script simultaneously after the script runs, but I wasn't sure if the script could undo its own actions automatically (mainly irreversible ones, like flattening the image or indexing colors).
Modder/Skinner at MarvelMods.com using GIMP to create, edit, and export textures and previews more efficiently.
My GIMP scripts hosted on GitHub
My GIMP scripts hosted on GitHub