Thursday, January 19, 2012

Softimage Plug-ins (Using Python)

The Big Picture:
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:

  1. Go to "File / Plugin Manager".
  2. Select the "Plug-ins" tab.
  3. Choose "File... / New / Command".
  4. In the SDK Wizard window that pops up, select the "Plug-in Definition" tab.
  5. Set the "Command Name" to the name you'd like to use to call this script.
  6. The "Plug-in" Name should automatically change - you can leave this alone.
  7. Be sure the "Coding Language" is set to Python.
  8. 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