Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Undo Operations in a Script
#1
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).
Modder/Skinner at MarvelMods.com using GIMP to create, edit, and export textures and previews more efficiently.

My GIMP scripts hosted on GitHub
Reply


Messages In This Thread
Undo Operations in a Script - by BaconWizard17 - 03-08-2023, 11:57 PM
RE: Undo Operations in a Script - by Ofnuts - 03-09-2023, 04:32 PM
RE: Undo Operations in a Script - by Ofnuts - 03-18-2023, 10:58 AM

Forum Jump: