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:
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. However, it is recommended that you create self- installing custom commands instead. See the Custom Commands [SDK Guide].
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.
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 Building and Deploying Customizations in the Softimage SDK Programmer's Guide.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License