When this icon is subsequently clicked, irrespective of the currently selected brush library, the original brush library, category and variant selected at the time of creating the respective custom palette link will automatically present themselves. This is wonderful far as it goes (and quite satisfactory if you simply wish to auto-load a specific brush category), but what happens if one wishes to link to more that one variant in the same brush category via a custom palette? Take a look at the uppermost custom palette above. As you can see, although each of the custom palette icons load a different brush variant, the icons are all the same i.e they are visually unique to the brush category, not the individual variants contained within. Which icon represents which variant is anyone's guess.
One alternative to the above problem is to place each brush variant you wish to link to via a custom palette, in individual brush categories, each having a unique brush category icon (Shane Caudle's wonderful Prismacolor brushes are perhaps the best known example of this method). Whilst this works from a unique brush variant icon basis, some may prefer to also have the standard option of variant selection from the Brush Variant menu in the Brushes palette/ Brush Selector Bar (although in this case, individual variants could be selected directly from the Brush Category menu instead, assuming there would be only one one brush variant per category). What will be totally disrupted however, is the ability to select from multiple variants within a category via the right click (Ctrl click) contextual menu option.
1. Identify the brush variants (from any brush library and category) which you would like to load via a visually unique icon in a custom palette(s).
2. Create individual 30x30 pixel jpg icons to represent them (see Icon Helper above) and for the moment, give each image file the same name as the variant it will represent (include the jpg file extension). For convenience, I save the jpg files to a dedicated desktop folder. Remember that although in this case, the custom palette icons will still be sourced from the selected brush category, you will be designing them to represent specific variants within that category.
3. Duplicate the above folder and contents, so that the original folder and contents will serve as a backup.
4. With Painter launched, from the Brushes palette/Brush Selector Bar, load the brush library associated with the first variant you wish to link to via a custom palette, and select that variant from the respective category.
5. In the Finder or Windows Explorer, navigate to the existing brush category icon jpg associated with the above category and rename it adding something like orig just before the jpg file extension e.g Sams Pens.jpg becomes Sams Pensorig.jpg
6. Return to the duplicate folder created in step 3 above and rename the jpg file associated with the variant you wish to link to via the custom palette, Sams Pens.jpg in this example.
7. Move the file renamed in step 6 to the same location as that renamed in step 5.
8. With Painter still open, continuing with our example, load/reload the brush library associated with the Sams Pens category, select Sams Pens from the Brush Pop-up menu in the Brushes palette (Painter 7), or the Brush Category menu in the Brush Selector Bar (Painter 8.1 through IX.5). You will see that the original brush category icon in the Brushes palette/ Brush Selector Bar has now changed to the new icon.
9. Select the specific variant you wish to link to from the Brush Variant Pop-up menu (Painter 7) or Brush Variant menu (Painter 8.1 through IX.5) before dragging the currently selected brush category icon from the Brushes palette/ Brush Selector Bar onto the desktop. You should now have the selected icon in a custom palette.
10. Without closing/quitting Painter, repeat the above steps 4 through 9 for the remaining brush category jpg icons and associated category variants you have created, but this time, in step 9, drag the icons to the newly created custom palette. Remember to reload the respective brush library and applicable brush category after each category icon substitution. There is no need to quit Painter between substitutions.
11. In the Finder/Windows Explorer, go back to the brush category icon jpg files you renamed in step 5 and remove orig from their name, thus reinstating the original brush category icons.
12. Before attempting to click any of the icons in the custom palette, quit/close Painter and re-launch. This step is to minimise the risk of losing all your new custom palette creation due to a Painter bug. It is also a good idea to save your custom palette as a new file which can be later imported if anything goes wrong; (Window menu> Custom Palette> Organizer> (select the respective custom palette in the Custom Palette Ogranizer dialogue)> Rename> Export.
Don't forget to also select the associated variant in the Brush Variant Pop-up menu/Brush Variant menu before dragging each new category icon to the custom palette.
Keep your original folder of custom icons created in step 2, as custom palettes have a habit of not being compatible with other Painter versions.
Below is the script code. Copy and paste the following (between the dotted lines) into a new text document and save it as a text file (.txt). Use this as your Load Variant Script Template.
--------------------------------------------------------copy below this line
script_version_number version 7
artist_name "Your Name (optional)"
start_time date Sat, Jun 10, 2006 time 23:18
variant "Brush Library Name" "Brush Category Name" "Variant Name"
end_time date Sat, Jun 10, 2006 time 23:19
After you have created your template file, edit the script in say NotePad (Windows) or TextEdit (Mac) by first adding your name on the second line, and for the variant you wish to auto load via a custom palette, on line 4 add the associated brush library name, brush category name and specific variant contained in that category. Ensure that the text does not line wrap and that the spelling and case are correct. It is not necessary to change the start and end times of the script.
In the following example, my custom brush library was Suminagashi, the brush category was 1 Suminagashi, and the variant name was Floranagashi.
In the above example, I subsequently did a Save As, and named the text file Floranagashi.txt, possibly saving to a Documents sub folder or wherever you choose.
The next step is to create a 'capture image' which will be used by Painter for the script icon associated with the variant; Floranagashi in this example. The final capture size of the image was 60 x 60 pixels (please see the section on Creating 'capture' images for conversion to script icons in my Icon Helper tutorial).
Once this has been created, with both Painter (IX.5 in this example), and the previously created 60 x 60 pixel image open and to the front, choose Window menu> Show Scripts (if the Scripts palette is not already visible on the desktop).
The next thing we are going to do is to create a new script library to house out variant loading scripts. Depending on the number of variants you wish to auto load via a custom palette/palettes, you may decide to have just one script library or several for this purpose.
To create a new script library, click the top right hand triangle in the Scripts palette and select Script Mover. from the flyout menu. In the Script Mover dialogue, click New. and in the resulting New Script Library File dialogue, Save As with an appropriate name (Load Variant Scripts in this example).
Note: To ensure the scripts will run via a custom palette, save the above script library file to on of the following destinations, depending on your version of Painter;
For Painter IX/IX.5 Mac;
Users > [username] > Library > Application Support > Corel > Painter IX
For Painter IX/IX.5 Windows;
Documents and Settings > [username] > Application Data > Corel > Corel Painter IX
For Painter 7/8.1;
The top level of your Painter application folder.
When you are happy with the script library name and location, click Save in the New Script Library File dialogue. In the Script Mover dialogue, you will see that the left hand pane contains the icons of the currently loaded Script library, and the right hand pane has taken the title of the new brush library, but as yet contains no script icons. In order to be able to load this new library in Painter, it must contain at least one script. In the Script Mover dialogue, we are therefore going to copy an existing script by dragging one of the script icons from the left hand pane onto the right hand pane. This script is just a temporary addition which can be later deleted via this same dialogue. Next, click Quit in the Scripts Mover dialogue.
Return to the Scripts palette and load the newly created script library (Load Variant Scripts/Load Variant Scripts.ssd in this example). To load the script library (Painter IX.5), click the current script icon in the Script Selector window of the Scripts palette. Next, click on the top right triangle of the resulting Scripts flyout menu and select Load Library. Finally, in the Choose Scripts dialogue, navigate to the Load Variants Scripts (in this example) file before clicking Open.
As an alternative to the above creation of a new script library, you could also perform the steps below using, adding scripts to an existing Script library and move the desired scripts to a new script library later (again, via the Script Mover dialogue).
We are now ready to import our Florinagashi.txt script into our new script library. To do this, click on the small triangle, top right of the Scripts palette, and choose Open Script from the flyout menu. In the Open Script dialogue, click Import and in the resulting Input Script File dialogue, select our example script text file Floranagashi.txt. Click open in this dialogue and name the script whatever you wish in the Script Name dialogue. It may be useful to choose to give the script the same name as the brush variant it will link to. The new script name should now appear in the Open Script dialogue. If there are no more scripts to import, click Done in this dialogue.
If not already selected, then click on the Script Selector window and select the Floranagashi script from the list. At this point, you will notice that icon for this script is plain white. With the associated 60 x 60 pixel capture image open and to the front in Painter, click the Play button (second button from left at the bottom of the scripts palette). You should now discover that Painter has automatically generated an icon for the current script in the Script Selector window, based on the currently selected image.
Tip: if you wish to change the script icon, follow the previous steps to re-import the script, assigning it the same name and follow the option to overwrite the original. You can now recapture the script icon using a different or modified capture image.
All that remains now is to drag the icon from the Script Selector window and onto the desktop to create our custom palette. Due to a Painter bug, do not click on the icon in the custom palette, but instead quit Painter and re-launch the application. You should now be safe to test the script by clicking on the associated icon in the custom palette. Note that there appears to be a bug in the Windows version of Painter 7, preventing the first item in the Scripts Selector list being dragged to/to create a custom palette. I normally record a simple Clone script to combat this, and ensure that via. the Script Mover dialogue (moving scripts to a new library), this script is the first in the list (I name this script A_Ignore).
Note that in Painter IX/IX.5, the associated script library should auto-load when the relevant custom palette script icon is clicked. In Painter 7 and 8.1 however, the Script palette's Load library option must first be used to load the relevant script library before the associated variant can be loaded via the custom palette.
I mentioned earlier that one advantage of using scripts this way is that should you later decide to move your linked variant to a different brush library/category, providing you don't change the name of the associated script library, the link to the variant file can be re-established by editing the specific script in the Script List (Script editing) window of the Scripts palette. To do this, in the Scripts palette (with the associated script library loaded), click on the triangle, top right of the palette and choose Open Script from the resulting menu. Select the desired script from the list in the Open Script dialogue and click Open. The script should then appear in the Script List window of the Scripts palette, but it is important to note that the script name and associated icon displayed at the top of the Scripts palette may not be linked with the open script in the Script List window (which can be confusing). In this window, click on the triangle to the left of the word Variant to expand the selection, and double click on the item you wish to change (note that Brush refers to the brush category). Edit the name in the Set String dialogue and click OK. Finally, click again on the respective triangle to collapse the selection before choosing Close Script from the Scripts palette flyout menu.
You may find that this method is quicker, with the added advantage that the associated script library is more likely to be forward compatible with other, later versions of Painter. Unlike the substituted brush category icons, the individual script icons will remain with the scripts, so can be dragged off at any time to create a custom palette.
Another advantage is that if you later change the location of a variant (by moving it to another brush library/category), it is a simple procedure to repair the link via in-palette editing of the script.
A disadvantage for pre-Painter IX users is that the associated script library must first be loaded via the respective Scripts palette menu, before they can be executed from the custom palette.
The basic outline of the procedure is that a standard text template is edited by the user simply entering the associated brush library name, enclosing brush category folder name and variant name for the specific variant one wishes to link to via a custom palette. One script template per variant, and each saved as a text file with a txt file extension. The text file representing a specific variant is then imported as a script via the Scripts palette. Create a 60 x 60 pixel image in Painter to represent the variant, and with the image document open and to the front, select the script in the Script Selector window and click the Play button at the bottom of the Scripts palette. Drag the resulting icon from the Script Selector window to/to create the custom palette.
Well, I actually discovered not one but two solutions. If you wish to try the following methods yourself, then you may also find it useful to check out my Brush Category and Script Icon Helper.
i. New Method
Note: these procedures often seem more complicated when written down than they are in practice. All that you are basically doing is replicating the same method normally used to create a custom palette for your selected brush variants, but in this case, you are substituting each associated category icon before dragging it from the Brushes palette/Brush Selector Bar to the custom palette.
Although clicking each of the icons in the custom palette loads a different variant, variant selection from the Brush Selector Bar remains unchanged.
Because in this method, variants are loaded using a more versatile script interface (as opposed to the dedicated internal script used by the old and new methods), other instructions can also be incorporated...for example;
Whilst developing the Suminagashi variants, I discovered a brush bug effecting the brush stroke appearance, which I believe is associated with the Rake stroke type variants when selected immediately after using some (maybe all) of the Plug-in method variants from the associated Distortonagashi brush category. By luck, I found a workaround of first selecting say the Sui Riu variant, touching the canvas with the cursor, then selecting the respective Rake type variant.
Whilst workable, the above fix is a little inconvenient, so I decided to incorporate the workaround in the associated auto-load variant script. Basically, the script first loads the Sui Riu variant, paints a short brush stroke in the top left corner of the canvas, undoes the stroke (in case the canvas is marked), then loads the respective Rake type variant. Apart from a slight delay in loading the desired variant, the user returns to the convenience of one click loading. Below is the script in text format, which I used to auto-load the Suminagashi Life Form variant (a Rake stroke type);