About Custom Commands

You can augment the native Softimage commands by creating custom commands to perform specialized actions. You can run custom commands by clicking a button in a toolbar or pressing a key on your keyboard. In addition, you can use custom commands in other scripts. Custom commands can also speed up the execution of scripts because only one command is logged to the history.

There are several types of custom command:

• Script-based commands are implemented in script files.

• Library-based commands are implemented in compiled library files.

• Self-installing commands do not need to be registered manually. They can be either script-based or library-based.

This chapter describes how to use the Softimage interface to create script-based non-self-installing commands, as well as initial templates for script-based self-installing commands. For information about using the Softimage SDK to create any type of command, see the SDK Guide.

What is a Custom Command?

While a script is simply a plain text file, custom commands contain the following information:

• A reference to the file containing the script to run. If you have not already saved your script as a file, it is automatically saved for you when you create a custom command. If the saved script file is modified later, clicking the button runs the modified script, not the original one.

• The command name to log in the history whenever the button is clicked, and to use when calling the custom command from other scripts.

• A description of the command. This description is displayed when you select the command in the Customize Toolbar dialog box.

• The language (scripting engine) to use to interpret the custom command.

• The procedure to call when running the custom command, if your script contains procedures.

• The values of any arguments, if your script requires them. You can also prompt users to supply values whenever the command is run.

• The text label to display on the button that runs the custom command.

Sharing Custom Commands

As with all customizations, you can store custom commands in a workgroup or package custom commands into add-ons so that you can easily distribute them to other users. See Sharing and Managing Customizations.

 

Non-self-installing compiled commands and events stored in the workgroup path will not work unless your environment is homogeneous—that is, all Windows or all Linux.



Autodesk Softimage v.7.5