A Multiple Undo-Redo Custom Palette for Painter Classic 1 Through Painter 8.1.
Click here to download the associated script library (PC version)
Click here to download the associated script library (Mac version)
I've been struggling for years with single increment undo and redos in Painter. Although the maximum number of undo (set via. the Painter Preferences) is currently 32, unlike Photoshop's History palette, there was no way of going back two or more steps in one click. If I wished to undo the last fifteen or twenty brush strokes, this meant pressing the Command + Z (Mac version), Ctrl + Z (Windows) keyboard short cut fifteen or twenty times in succession. Making a selection of a specific area of the canvas and choosing Edit> Clear, or selective erasing are effectively 'media delete' operations (only clearing media on the canvas or layer and would not undo a filter operation for example). I could also record my work as a script and stop at any stage during play back, but this option still requires extra steps and time.
To circumvent this impairment to work flow I have built a library of multi-level undo and redo scripts which should work in all versions of Painter from Classic 1 up to the current version (8.1). For optimum productivity, the scripts are best used by first creating a custom palette from them. This is a simple process which should only take a few minutes. Please refer to your Painter manual or help files for details of creating and organising custom palettes if you are unsure. An updated Painter 8 user guide pdf (includes a section on custom palettes; pages 28 through 32) is also available via. Corel's ftp server.
Script Library Install and Loading Instructions.
After unzipping the script library folder, move or copy the library file ( 'Undo_Redo' or 'Undo_Redo.SSD') to the top level of your Painter application folder. Next, launch the Painter application and ensure that the Script palette/ section is visible. If the Scripts palette section is not visible, select it via. the Window menu. In Painter 7, the Scripts section is found in the Objects palette (Window menu> Show Objects). In Painter 8, the scripts are assigned their own palette (Window menu> Show Scripts). To load the new script library, choose the 'Load Library' option from the respective script palette menu, navigate to the new script library via. the resulting dialogue window and click 'Open'. The screen shots left and below show the locations of the scripts 'Load Library' option in Painter 7 and Painter 8.1 respectively.
You will see that in the above images, the Undo_Redo script libraries have already been loaded and the first script in the list is entitled 'A_Ignore'. As the name suggests, just ignore this script for the purpose of the custom palette. This script forms the basis of a work around for a bug in Painter 8.1 (believed to be only in the PC version), whereby the first script icon listed in the script library cannot be dragged to a custom palette; (this particular script simply performs a File> Clone operation).
I have designed the individual script icons such that those with a black background perform undo operations, and those with a white background, redo operations. The level of undo is indicated by the number on each icon. For example, if I make two separate brush strokes on my canvas, then click the '2' icon with a black background (from the resulting custom palette), the two strokes will be undone. Clicking the '2' icon with a white background will return the two strokes (as would clicking the '1' icon with the white background twice).
Note that the scripts only operate within the confines of the maximum undo levels set in the Edit menu> Preferences> Undo (Painter 7/8 menu> Preferences> Undo in Mac OSX). For example, if I made eight separate brush strokes consecutively on the canvas, and my maximum Undo levels were set to 7 in the preferences, clicking the '8' icon with the black background would only undo seven of the eight strokes. In a similar manner, the 'Redo Max' and 'Undo Max' scripts will only undo or redo the maximum number of operations set in the Undo levels preferences (assuming at least that number of operations had already been completed on the image).
Below are demo images of example custom palette layouts for the Undo_Redo scripts. Note that the custom palettes may differ depending on your version of Painter and the platform. The more compact palette on the left was created in Painter 7 (Mac OSX), and you can see that I have added extra command buttons for Fade etc. using the 'Add Command' option (Window menu> Custom Palettes> Add Command). The equivalent custom palette on the right was created in Painter 8.1 (Mac OSX), which due the palette design, takes up a significantly larger area of screen space (although there is an option to collapse the latter palette by clicking the small arrow in the top left). Note that the command buttons may be greyed out until the criteria exists for the specific associated function to be performed successfully (for example, a selection has to be made in or around the image before the 'Clear' command can be executed).
Example Painter 7 Custom Palette (Mac OSX).
Equivalent Painter 8.1 Custom Palette (Mac OSX).
If you require a smaller, more compact custom palette (particularly if you are working in Painter 8.1), you could do away with the bottom two rows and have icons for eight levels of undo and redo. As I mentioned earlier, the undo/ redo levels are accumulative, so clicking one of the number '8' script icons a total of four times in the custom palette will give you the maximum of 32 levels of undo or redo (assuming 32 levels were previously set in the preferences). Clicking the undo 7 followed by undo 2 icons in the palette will give you a total of 9 undo levels, and clicking undo 8 followed by redo 2 will take you back to 6 levels of undo.
Below is an example custom palette constructed in Painter 6.1 (Mac OS9), which only uses script icons for 8 levels of undo/ redo. You can also arrange the palette horizontally as say 2 rows of icons by 8 columns or vertically (8 rows by 2 columns).
A Special Note to Painter 7 Users;
In Painter 7 (at least in the Mac version), if the script library associated with the custom palette icon(s) is not currently loaded, an error message to the effect that "The script library file could not be opened" will be displayed when the respective custom palette icon is clicked. As far as I know, this only happens in version 7. In other Painter versions (apart from 8.0, where custom palettes are not available), the associated script library will automatically load and the chosen script execute when the relevant custom palette icon is clicked. Painter 7 users may therefore need to manually load the Undo_Redo script library in order to use the associated custom palette.
Below is a method you could use to make the 'Undo_Redo' scripts ('Undo_Redo.SSD'- Windows) library the default, so that it is no longer necessary in Painter 7 to keep loading the custom scripts library whenever you wish to use the associated custom palette. This procedure could be accomplished using the script mover feature, but I found it much quicker to do it the way described below. I assume the procedure is similar for Windows users, but please make a note of all the changes you make in the event that if something goes wrong, you can revert back.
1. Ensure the file 'Undo_Redo'/ 'Undo_Redo.SSD' is at the top level inside your Painter application folder (i.e. not inside any secondary folders).
2. Quit/ Exit the Painter application and open your Painter application folder in the finder to view it's contents (there will be an equivalent procedure on the PC)
3. On the Mac, locate the default scripts library file ('Painter Script Data') and rename it something like 'Painter Scripts Original'. (On the PC, I believe the default scripts library file is named 'Painter.ssd'. In this case, rename the file something like 'Painter Scripts Orig.ssd').
4. Next, on the Mac, locate the file 'Undo_Redo', and rename the file exactly as the default scripts library name ('Painter Scripts Data'). Ensure that the spelling, word spaces and upper/lower case letters are exactly the same. (On the PC, this would be the same as for the Mac *except* you would rename the library 'Painter.ssd' (or exactly as your original default script library is named).
5. Launch the Painter application.
6. You should see that the default scripts library now contains all 19 scripts. As this is now the new default library (albeit having the same name as the original default library), your daily 'auto-saved' painting session scripts will automatically be added to this library. In order to keep the file size of this script library down, in Painter> Preferences> General, ensure that the 'Auto-Save Scripts' box is set to 1 day.
An Issue for Painter 7 and 8.1 Users;
There appears to be a scripting bug introduced in Painter 7 and carried though to version 8.1. In these versions (at least on the Mac), if the current brush library is not the default, when you subsequently click any of the undo or redo icons in the custom palette, although the script operations will be completed, Painter will automatically load the default brush library :(
This is not going to be a problem if you are only working with brush variants from within your default library, but is going to be a big problem when trying to use the Undo_Redo scripts with non-default custom brush libraries. Other than going back to using Painter 6.1 or earlier, the only work around I can suggest is to collect all your favourite, most commonly used brushes together in one custom library and after calling the new library something like 'Favourite Brushes', proceed to make this library the default. This can be done by first selecting Edit menu> Preferences> General (Painter 7/8 menu> Preferences> General in Mac OSX). Simply change the 'Brushes' (library) name in the Libraries section of the General Preferences dialogue to the exact name (including corresponding upper and lower case characters) of your new brush library. Quit and relaunch Painter and your new default custom brush library should automatically load at start up of the application. At least this way, you should be able to use the Undo_Redo scripts with your favourite brushes in Painter 7 and 8.1.
A Final Note Regarding Undo Levels;
Although as already mentioned, the maximum undo level is currently 32, the entire image has to be saved for each undo step. This can take up a significant amount of disk space, so I would recommend keeping the maximum undo levels preference to a low value (perhaps 8 or so) if you are working with large image file sizes.