You can run a custom command in any of the following ways:
By clicking a button or selecting a menu item in a custom toolbar. See Running Commands from Custom Toolbars.
By pressing a key on the keyboard. See Running Commands from Keys.
Automatically whenever you select something in a 3D view or whenever you change frames. See Running Commands Automatically.
When you run a custom command, the command gets logged to the history, together with any parameter values.
If the command contains only actions that can be undone (for example, if it does not contain commands like DeleteAll), then you can undo the result of your custom command by choosing Edit Undo from the main menu.
You can add custom commands to custom toolbars in the same way as any native command — see Adding Commands to Toolbars. In the Customize Toolbar window, set Command Categories to Custom to make it easier to find your custom commands.
You can map a custom command to a key on your keyboard in the same way as any native command. The complete procedure is described in Modifying Key Assignments. In the Keyboard Mapping window, select Custom Script Commands from the Group list to make it easier to find your custom commands.
You can run custom commands or any native Softimage command automatically in either of the following ways:
You can also bind scripts and commands to events so that they are triggered automatically in response to specific actions and states. For more information, see Custom Events [SDK Guide].
To run a script file automatically, you must first create a custom command based on the script.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License