Blog

Permalink to How to set presets for tools

How to set presets for tools

Ever wished you could set presets for your tools such as the Knife or Weight Tool much like any parametric object?
Well, this is possible by creating a simple script for each preset you wish to create. Here is the step-by-step procedure.

>> First, you’ll need to launch the Command Manager, by going into the menu “Window>Layout>Command Manager” (Shift+F12).

>> Now, enter “script” into the name filter field, and select the Script log and Script Manager and open them (hit “execute” to launch them).

command-manager.jpg

>> The Script Log is a manager that allows you to keep track of certain commands. Not everything is supported, but most tools and tools options are, so this is a neat way to have C4D create the code for you, especially if you are not too good at scripting (like me).

 

scriptlog.jpg

>> The Script Manager is where you will script your actions and tools. The default script is the “save as template” command, so you first need to create a new script for your preset.

 

scriptmanager.jpg

scriptmanager3.jpg

>> Now that you have created your new empty script, keep an eye on the script log, and select the Weight Tool (for example).

weightool.jpg

>> Notice how the log shows what tool you selected, and put it into a form that C4D will understand. This is actual scripting in Cinema4D (to empty the script log, just select the text and hit “backspace”).

scriptlog2.jpg

>> Now, set the options of the Weight Tool as you wish. Be careful to enter them in one go, because the log will keep a trace of every changes you make, even if you change the strength value 3 times. You don’t want the tool to change the strength value 3 times each time you call for it, that’s not really efficient.

weightool3.jpg

>> Here, I set my weight tool to paint in absolute mode (meaning that I want it to set a specific value each time I click the mouse, without any degree of variation), and you can see that my script log reflects those changes.

scriptlog4.jpg

>> Just copy the script available in the script log, and paste it into the script manager, in its entirety.

scriptmanager2.jpg

>> You’re done. If you click “execute”, it will call the Weight tool with these specific values. Just set the Weight Tool back to other values, execute the script and see how it works.

>> The last things you might want to do is to place the icon in a palette, or in your interface. Just drag and drop it wherever you need it. You can even assign a shortcut to this script. Optionally, you can also set your own customized icon by clicking on the “load icon” button, and loading your image.

editpalette.jpg

Of course, don’t forget to click the “save all” button, to save any number of scripts you have created. These are saved into the “Library>Scripts” folder, and can be found via the drop down menu at the top of the script manager.


2 Comments to How to set presets for tools

  1. Very very useful and extremely powerful, thanks for the tip!!

  2. Leonard Marsh

    Your tutorials are quite good – the best, in fact. Useful subject, brief, very clear and I hope to find a bunch more. Cheers.

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA image
*

Archives