C# Development

Using C# with Softimage

C# (pronounced "C sharp") is a simple, type-safe programming language that represents a hybrid between C++ and scripting languages. Plug-ins written in C# are much faster than scripted plug-ins and as of v6.0, Softimage plug-ins can be written in C#.

For more information about the C# language, the Microsoft Developer’s Network (MSDN) has technical specs and C# reference and overview documentation. In addition, MSDN offers a C# FAQ and Microsoft’s GotDotNet provides a number of QuickStart tutorials.

 

If you don’t have Visual Studio .NET 2005, you can use Visual C# Express, a free version that comes with full C# doc and a debugger.

How C# Works with Softimage

The Assembly is the primary unit of deployment within the .NET Framework; it is similar to a C++ .dll or .so file and can contain references to other assemblies and modules.

The Softimage Object Model type library has been ported to a C# assembly which allows developers to access the Softimage SDK using C#. Virtually the entire object model is accessible, except for a few interfaces which are not available:

• obsolete interfaces: XSIDialog, Cluster_V1, ClusterProperty_V1, Geometry_V1, Geometry0D, Geometry1D, and Geometry2D

• empty interfaces: AlignedAxisConstraint and SpotLight

PPG (handled by the class for C#) and XSIFileService (import/export services)

 

Visual Studio .NET 2005 provides useful features that you can use to familiarize yourself with the Softimage Object Model for C#. These include an ObjectBrowser that you can use to browse through the Softimage object model typelib and an autocomplete function which provides a list of available objects and their members as you type your source code.

How C# Plug-ins Work with Softimage

Instead of functions exported from a .dll, C# plug-in items are implemented as C# objects. You create a plug-in object that implements public methods matching the plug-in item callbacks. To get a hook into Softimage, you make sure you include the XSIOM (object model) assembly and then create a base object that will register the plug-in in Softimage. For more information, see Building Softimage Plug-ins with C#.

 

Note that Object Model COM interfaces are no longer backward-compatible as of v6.0. C# plug-ins created with v6.0 will have to be recompiled in order to run with versions greater than 6.0.

 



Autodesk Softimage v7.5