I need to understand how to create a Command in Softimage.
The Problem:
I've never used it before! I need to understand the fundamentals.
The Solution:
Follow the steps below to create a basic new Command:
- Go to "File / Plugin Manager".
- Select the "Plug-ins" tab.
- Choose "File... / New / Command".
- In the SDK Wizard window that pops up, select the "Plug-in Definition" tab.
- Set the "Command Name" to the name you'd like to use to call this script.
- The "Plug-in" Name should automatically change - you can leave this alone.
- Be sure the "Coding Language" is set to Python.
- For the sake of explanation, click the "Generate Code" at the bottom of this window. It will create a template of code for you to begin editing.
The code you want executed needs to be placed under the
YourPluginName_Execute()function.
To test that you've set everything up correctly, open the script editor in Softimage and call your new Command by simply typing:
Application.YourCommandName()
You can call this Command from any other script just like any other native Softimage Command.
What I Discovered:
Creating a Command/Plug-in is pretty straightforward and simple. There weren't really any caveats that I encountered so far when using them, but I'll be sure to make an update if I find one down the line.
No comments:
Post a Comment