Contents
Softimage SDK Programmer's Guide
What's New / What's Changed
Softimage 2014
Softimage 2013
Softimage 2012 Subscription Advantage Pack
Softimage 2012
Softimage 2011
Getting Started
Introducing the Components of the SDK
Understanding the Softimage SDK Architecture
About the Structure of the Softimage APIs
How is the Softimage Object Model Different from the C++ API?
Types of Customization in Softimage
Using the Help
How to Read the Commands and Scripting Reference Guide
Customizing Softimage using the SDK
Self-Installing Plug-ins
What is a Self-Installing Plug-in?
Getting Started with the Plug-in Wizard
Setting Plug-in Properties
Specifying a Help File for a Plug-in
Registering Plug-in Items
Naming Plug-in Items
Using Prefixes with Custom Properties
Exporting Callbacks
Deploying Self-Installing Plug-ins
Callbacks for Self-Installing Plug-ins
Callbacks by Plug-in Type
Callbacks List
Custom Primitives
Creating a Custom Primitive
Custom Primitive Wizard
Custom Commands
What is a Custom Command?
Custom Command Wizard
Registering Commands
Setting Command Capabilities
Providing User Interface Text for a Command
Adding Arguments
Working with Arguments
Returning Values
Exporting C++ Callbacks
Calling C++ Custom Commands from Scripting
Adding Commands to Menus
Undoing and Redoing Custom Commands
Custom Operators
What is a Custom Operator?
Registering Operators
Custom Operator Wizard
Making Connections
Adding Custom Parameters
Static versus Dynamic Operators
Applying Operators in Softimage
Limitations
Runtime vs. Self-Installed Custom Operators
Tips and Tricks
Custom Properties
What are Custom Properties?
Creating Custom Properties
Building Dialogs
Defining a Custom Property
Creating a Self-Installing Property
Migrating Properties to Self-Installing
Property Callbacks
Property Page Controls
Labels
Static Text
Bitmap Widget
Editable Text Boxes
Single-line Text
Multi-line Text
Text Editor Widget
Enum Controls
List Box
Combo/Drop-Down Box
Radio Buttons
Icon Buttons
Bitfield
Path Controls
File Browser Widget
Folder Widget
Numeric Controls
Numeric Edit Box with Slider
RGB Color Control
RGBA Color Control
FCurve Widget
GridData Widget
Synoptic Widget
Check Box
Command Button
Setting Control Attributes
Grouping Controls
Wrapping Controls (Rows)
Using Multiple Pages (Tabs)
Resizing Control Windows
Dynamically Changing Custom Properties
Defining On-the-fly Property Pages
Providing Help Files
Custom Property Page Examples
Custom ICENodes
What is a Custom ICENode?
Processing phases
Implementation Overview
Registering a Custom ICENode
ICENodeDef Objects
Registration Example
Custom ICENode Processing
Port Data Access
Port Data Indexing
Iterating Over Port Data
Multiple Port Connections
Handling Port Polymorphism
User Data
CustomVector3ToScalar Example
Custom ICENode Categories
Regular Custom ICENode
Single-Thread Custom ICENode
Multi-Phase Custom ICENode
Element Generator Custom ICENodes
Single-Thread/Element Generator Custom ICENode
Multi-Phase/Element Generator Custom ICENode
Applying Custom ICENodes
Custom ICENode Wizard
Ports
Custom Types
Options
Code
Customizing Icons for Custom ICENodes
Limitations
Custom Shaders
Understanding Softimage Custom Shaders
Instantiating Shader Definitions and the ProgID
Creating Shader Definition Plug-ins
Creating Shader Language Parser Definitions
Creating Realtime (Hardware) Shader Plug-ins
Populating the Preset Manager
Shader Families
Detecting Shader Families
Native Softimage Shader Families
Creating Custom Shader Families
Shader Parameter Definitions
Parameter Data Types
Adding Parameter Definitions
Refining UI Controls for Parameter Definitions
VBScript Example: Grouping Ports in the Render Tree
JScript Example: No UI for Parameter Definition
Setting ShaderDef Attributes
Providing Renderer Information
Editing Shader Code in Softimage
Shader Definition and Parser Examples
Using the Mental Ray Shader Wizard
Custom Fx Operators
What is a Custom Fx Operator?
Source Code Examples
UFO Terminology
Implementation
Definition
Raster Inputs and Outputs
User Data
Rendering
Screen Drawing and Screen Interaction
Memory Allocation
Compiling Fx Operators
Installing UFOs
Character Development Kit
Using the Character Development Kit
Command Access to Rig from Biped, Dogleg, and Quadruped
Building a Customized Rig
Example: Anatomy of a Custom Rig Script
Identifying Guide Objects in the Default Guides
Head and Neck
Chest and Spine
Belly and Hips
Tail
Arms, Hands, and Fingers
Legs and Feet
Skin
Working with Return Values
Example: Making an Octopus Rig
CDK Object Reference
Biped
Quadruped
Head
Arm
Hand
Belly
Spine
Torso
Tail
Leg
DogLeg
Foot
Joint
Shadow
BicepRoll
ForeArmRoll
ControlSpline
PointSlide
ThighSlide
UI
Custom Filters
What is a Custom Filter?
Filter Types
Filter Callbacks
Creating a Filter
Writing 3D Object Filters
Writing SubComponent Filters
Writing Property Filters
Writing Object Filters
Using Custom Filters in Code
Registering a Filter
Custom Events
What is an Event?
Supported Events
Creating an Event
Registering Event Handlers
Event Callbacks
Context Attributes
Muting Events
Programmatically Installing Event Handlers
Custom Display Host
About the Custom Display Host
Setting Up the Developer Environment
Components of a Custom Display Host
Custom Renderers
What is a Custom Renderer?
Registering a Rendering Engine
Adding Properties
Specifying File Formats
Rendering Images
Exporting Archives
Single and Multi-Frame Archives
Rendering a Subset of the Scene
Device Drivers
What is a Device Driver?
Creating a Device Driver
Registering Your Device Driver in Softimage
Packaging Your Device Driver
Device Driver Example
Standard and Contextual Menus
What Can I Customize with Menus?
How to Make Your Own Menus
Registering a Custom Menu in Softimage
Packaging Your Custom Menu
Custom Menu Examples
Spreadsheet Queries
What is a Spreadsheet Query?
Scripting for the Spreadsheet Queries
Installing the Spreadsheet Queries
Building and Deploying Customizations
What are my Deployment Options?
Using the Softimage User Interface Toolkit (XSIUIToolkit)
Walkthrough: The Plug-in Manager
Working with the Plug-in Manager
Working with the Plug-in Tree
Resolving Plug-in Conflicts
Using Workgroups
Managing Workgroups
Walkthrough: Building an Add-on
Add-on Packages
Add-on Directories
Documenting Add-ons
Packaging Add-ons
Editing Add-on Packages
Installing and Uninstalling Add-ons
What's in an Add-on Package?
Using Install Shield to Install Softimage Plug-ins
Using the Package Dialogs
Using the Command Line for Installing Files and More
Working with Add-ons through the Object Model
Limitations
Cross-Platform Deployment
Bundling Several Handlers in One Library File (.DLL/SO)
Graphic Sequencer
About Controlling the Hardware Display in Softimage
Creating Softimage Graphic Sequencer (XGS) Plug-ins
Viewport Callback Types
Working with the SDK
Selection
Accessing the Selection
Finding Out What's Currently Selected
Accessing the List of Selected Objects
Accessing the List of Selected Components via the Object Model
Accessing the List of Selected Components via the C++ API
Working with the Selection List as a CRefArray (C++ API only)
Getting the Current Selection Filter
Manipulating the Selection
Selecting a Single Item (Adding to the Selection)
Selecting a List of Items
Deselecting Specific Items (Removing from the Selection)
Deselecting Everything (Clearing the Selection)
Dealing with Hierarchy
Modeling
Deforming Geometry (Changing Components)
Changing the Topology (Adding and Removing Components)
Getting at Clusters
Accessing Texture UVs
Accessing Vertex Colors
Enumerating Polygon Islands
Getting the Local Reference Frame
Manipulation Mode Values
Animation
Animation Levels
Expressions
Creating Expressions
Accessing Expressions
Linked Parameters
FCurves
FCurve Interpolation and Extrapolation
Constraints
Shape Animation
Envelopes
Sources and Clips
DataSource
Relative Name
Animation Mixer
Playback Controls
Accessing the PlayControl Property Set
Getting and Changing the Current Frame
Moving Around in the Timeline
Starting the Playback in Any Direction
Changing the PlayControl Options
Controlling the Frame Rate and Format
Running Commands During Playback at Each Frame Change
ICE Nodes
What is ICE?
Port Polymorphism and Data Integrity
Accessing Data from Array Nodes
Debugging ICE Graphs
ICE Node Particles
Creating a Particle Cloud
Accessing the Components of a Simulated ICE Tree
Working with the Softimage Scene Graph
Finding 3D Objects
Tree Crawling
Special Navigational Tools
Finding Elements using the Full Path
Working with Parameters
What is a Parameter?
Accessing Parameter Values
Compound Parameters
Proxy Parameters
Setting Values After a Scene Has Loaded (Auxiliary Files)
Working with Return Values and Output Arguments
What is a Return Value?
What is an Output Argument?
Output Argument Support by Language
What is an ISIVTCollection?
What Happens when the Function Already Returns a Value?
Examples of Handling Return Values and Output Arguments
VBScript Example: Output Arguments vs. the ISIVTCollection
VBScript Example: Getting Output Arguments from a Method
JScript Example: Using the Method Ô2' Workaround
JScript Example: Using the ISIVTCollection
Python Example: Working with the ISIVTCollection returned from a Command
Python Example: Using Tuples to Access Output Arguments from a Method
Example: Custom Command Workaround for Both Output Arguments and Return Values
Working with Operators
What is an Operator?
Applying Operators
About Connection Sets
Accessing Operators and Beyond
Working with Files and Paths
Getting External File Information
UNC Path
Storing Custom (User) Data
What is User Data?
Attaching Binary User Data to Objects
Accessing Binary User Data on Components
Accessing Templated User Data on Components
Finding User Data in a Scene
Importing User Data from SOFTIMAGE|3D
Interacting with the User
Working with User Preferences
Script Development
Introduction to Scripting in Softimage
Supported Scripting Languages
Using the Softimage Object Model for Novices
Where to Find More Information
Python Scripting
Getting Python to Recognize Softimage Constants (Enums)
Getting Output Arguments from Methods
Linking Python Classes to Command Buttons
Working with Custom Python Modules in Softimage
Returning Python Types from Custom Commands
Shortcuts for Python
Tips
Examples
Command Examples
Object Model Examples
Script Editor
Using the Script Editor
Editing Scripts
Making Coding Easier
Customizing Your Scripting Environment
Using the Command History
Getting Help
Managing Script Files
Running Scripts
Accessing Scene Elements
String Expressions
Object Name
Components
Element Types
Parameters
Object List
Marked Parameter List
Selecting through Scripting Commands
Data Types and Return Values
What is 'Type'?
Comparing Data Types across Languages
Integer
Long
Float
Double
String
Boolean
Variant
Array
KeyValue
Returning Values
What You Should Know about Return Values
What to Watch Out for with Objects and Collections
Making Sure Returned Values are Valid
Checking Return Values for Type
Working with Arrays (and Other Collections) in Softimage
Using (Native) Arrays
Using the GridData Object
Using a GridData Object in a Custom Property Set
Using a Temporary GridData Object
Collections vs. Arrays
Using Collections
Creating and Adding to Collections
Removing Collections and CollectionItems
Groups vs. Collections and Arrays
Using Native Softimage Commands To Access Groups
Using the Object Model to Access Groups
Special Scripting Functions and Objects
Creating ActiveX Objects
Global (Intrinsic) Objects
Writing Optimized Code
Use the Object Model instead of GetValue and SetValue
Using EvaluateAt() instead of Changing the Current Frame
Using Global Variables with the Object Model
Avoiding Unnecessary Conversions between String Expressions and Object Pointers
Debugging Scripts
Using the Microsoft Script Debugger
Using the PyWin Debugger
Understanding Error Messages
ERROR : 2001-<function_name> - Argument <#> is invalid
ERROR : 2038 - Bad Variable Type
ERROR : 2000 - Argument <#> (<parametername>) is invalid
ERROR : Cannot use parentheses when calling a Sub
ERROR : Expected end of statement
ERROR : Invalid argument specified
ERROR : <enum_name> is not defined
ERROR : <tuple_name> is not defined
ERROR : 'tuple' object has no attribute
ERROR : Object doesn't support this property or method:
ERROR : Object not a collection
ERROR : Object required
ERROR : (Python) dict can not be converted to a COM VARIANT
ERROR : Syntax error
ERROR : Type mismatch
ERROR : Wrong number of arguments or invalid property assignment
Issues in Batch Scripting
How to Check in Which Mode (Batch or Interactive) Softimage is Running
Passing Arguments to Batch Scripts
Running Scripts in Batch Mode
Running Scripts Remotely
Automatically Closing the Command Window
Real-Time Message Logging
Interacting with Other Applications
C++ API Development
About the C++ API
Building C++ Plug-ins
Creating C++ Plug-ins
Compiling Plug-ins
Debugging Plug-ins
Rebuilding Plug-ins
Common Build Problems
Environment Variables and Build Flags
Programming with the C++ API
Referencing Softimage Objects: CRef
About the CRef Casting Operator
Interacting with Softimage
Using Variants and SafeArrays
UV Ordering
Parameter Performance Optimization
Calling Commands from C++
Accessing Return Values
Dealing with Output Arguments
Legacy Plug-in Callbacks
Migrating Legacy Plug-ins
Mixing the C++ API with the Softimage Object Model
C# Development
Using C# with Softimage
Building C# Plug-ins
Creating C# Plug-ins
Compiling Plug-ins
Debugging Plug-ins
Rebuilding Plug-ins
Common Build or Load Problems
Plug-in Fails to Load from Network Share
Softimage Failed to Load a .NET Plug-in
Programming with C#
Interacting with Softimage
About Data Types and Casting in C#
Using Enums and String Constants
Calling Object Model Members
Calling Commands from C#
Building Softimage Plug-ins with C#
Creating an XSICollection Object