Softimage SDK Examples

The Softimage SDK include a wide variety of sample plug-ins implemented in C++, C#, JScript, Python and VBScript. The examples include self-installing plug-ins (such as commands, properties, filters, menus, and custom displays), operators, importers and exporters, relational views, realtime shaders, and UFOs.

The Softimage SDK examples are located in the examples folder of the Softimage SDK installation folder:

Most of the SDK examples are included in a workgroup, which makes it easy to load and try out the examples and to browse the source code.

To load and run the workgroup examples

  1. Connect to the Softimage SDK workgroup at %XSISDK_ROOT%\examples\workgroup.

  2. In the Plug-in Tree, expand the SDK examples workgroup, right-click an example add-on and then click Help.

    The NetView help page explains how to run the examples and gives you single-click access to the example source code.


Workgroup Examples

C# Scripting [ C# ]
This plug-in shows how to use C# as a scripting language from the Scripting Editor. You can use it when you need to test some simple C# code in Softimage without having to create a plug-in.

Constraint Operators [ C++, C#, JScript, Python ]
This add-on shows various self-installed custom operators that "constrain" objects together. This sort of operator is common when building rigs and is an alternative to the Constraint, Expression and Proxy Parameter features of Softimage.

Converter Event [ VBScript ]
This example shows how to implement import/export converter events as a self-installing plug-in with VBScript.

Custom Command Examples [ C++, C#, JScript, Python, VBScript ]
The Simple Command examples demonstrate how to implement self-installing custom commands using various implementation languages. The Simple Undoable Command also shows how to implement an undoable C++ API custom command.

Custom ICENodes [ C++ ]
These examples show how to implement custom ICE nodes as self-installing plug-ins.

Custom Primitives [ C++]
This example shows how to define custom primitives and use the related callbacks.

Custom Shader Definition [ C++, C#, JScript, Python, VBScript ]
These examples show how to create self-installing custom shader definitions.

Custom Shader Parser [ JScript ]
This example shows how to create a self-installing custom shader language parser.

Custom Tools [ C++ ]

This addon shows various self-installing custom tools.

Custom UI Test [ C++ ]
This C++ example is a custom display that handles Softimage notifications and Win32 messages. The example shows how to define the interface and callbacks to Softimage, and how to access the notifications that Softimage pushes to the custom display host.

Drag and Drop Event [ Python ]
This python examples demonstrates the use of the siDragAndDrop2 event. It shows how to use the event to allow duplicating of 3D objects by dragging from the scene explorer and dropping it into position in the viewports.

GridData [ C++, Python ]
This example shows how to use grid data object and widget to display object information in the scene and edit them via the Grid control. It shows the various GridData PPG events and how to handle them.

Deform Operators [ C++, C#, JScript ]
This example shows how to create deform operators. These are operators which change an existing polygon or nurbs mesh.

Import/Export [ C++ ]
This example provides a good starting point for writing your own importer/exporter using the Softimage C++ API. The example shows how to create a user interface for a typical import/export application, export geometry using the CGeometryAccessor class, and import polygon meshes using the CMeshBuilder class.

Inspect ICE Attributes [ C++ ]
This example demonstrates how to navigate through the ICE attributes of a geometry or property and how to log all attribute values. The sample code uses a C++ API class template to log the values and operates with generic ICEAttribute types.

Light Filter [ JScript ]
This example shows how to implement a custom filter as a self-installing plug-in that handles light objects.

myCache Exporter [ C++ ]
This C++ example demonstrates writing your own exporter for cache files. The example uses the MDAttribute as well as the CMDAttributeDataArray.

ParticleOp [ C++ ]
This C++ example shows how to write a particle operator that manipulates a particle cloud. The particle operator makes the particles in a cloud flock together. A custom property page allows you to tweak the variables that control the flocking behavior.

PDC Export [ C++ ]
This C++ example demonstrates writing your own exporter for Maya PDC cache files. The example uses the MDAttribute as well as the CMDAttributeDataArray.

PPG Demos [ JScript, VBScript ]
This example is a collection of examples that show how to build property pages (PPGs). A toolbar provides access to the different demos.

PSet UI Demo [ JScript ]
This example shows how to use a custom property (a set of custom parameters) to build a user interface for a plug-in.

Realtime Shaders [ C++, CgFx ]
This add-on shows various real-time effect shaders written with the HLSL and CGFX language.

Project Selector [ C#, JScript ]
This plug-in demonstrates how to use the change project event (siOnChangeProject) in JScript.

Sample Display Callback [ C++ ]
This example contains a Display Callback (MyClearScreenBuffer) and a Display Pass (MyCustomPass).

Sample Shelves [ XML ]
This example includes a number of different shelves.

Sample Relational Views [ XML ]
This example includes a number of different relational views.

Schematic API [ Python ]
This example shows how to navigate and rearrange a schematic view with the Schematic and SchematicNode API.

ShowEdges [ C++ ]
This example includes two related examples:

SimpleFilter [ C++, C#, JScript, Python, VBScript ]
This example shows how to implement a custom filter as a self-installing plug-in. Softimage installs the custom filter at startup and automatically adds it to the filter menu in the Select panel of the main command area. When Simple Filter is the active selection filter, you cannot select polygon meshes with less than fifty vertices. The C# Triangle Filter limits the selection to triangles.

SimpleMenu [ C++, JScript, Python, VBScript ]
This example shows how to add custom menus in Softimage. The example includes JScript, VBScript, and C++ versions.

TimerEvent [ JScript ]
This example demonstrates how to use timer events in Softimage. The example includes a JScript version.

VertexColorMixer [ C++, SPDL ]
This example shows how to create an operator that reads from many vertex color properties and writes a 'processed' result to a vertex color property acting as the mixed result. The code shows how to implement port group instances, a feature that allows you to connect many objects to the same port group, in this case "Group_1".

Vertex Colors [ C++ ]
This example is a custom display that provides tools for editing vertex colors on polygon meshes.

XSIA [ JScript ]
This example shows how to implement a custom filter as a self-installing plug-in that handles light objects.

XSIGame [ C++, JScript ]
This example shows how to integrate a game render window and modtool into Softimage.

XSI Server [ C# ]
This plugin provides an example of a TCP/IP server implementation for Softimage.


Other Examples

In addition to the workgroup examples, you can find these other examples in the Softimage SDK examples folder.

examples\realtimeshaders [ C++, SPDL ]
Source code for the CG, DirectX, and openGL realtime shaders. Also includes the XSI_OGLHelper project, a set of helper functions and macros for developing realtime OpenGL shaders.

examples\graphicssequencer [ C++ ]
C++ source code for the DX9Display display pass and display callback.

examples\UFOs [ C ]
The folder examples\ufos contains Media Illusion User Function Object plug-ins that are used in the Softimage Illusion FX Tree.