Softimage SDK Programmer's Guide > Plug-in Development > Understanding the Softimage SDK Architecture >

# About the Structure of the Softimage APIs

The C++ API and the Softimage Object Model (OM) are both implemented using an object-oriented approach. This means that classes that are children inherit the functions of the parent class and then extend that class by implementing more specific functions. Hierarchical representations of both APIs are available:

- Object Model: Object Hierarchy

- C++ API: Class Hierarchy

You can also use the SDK Explorer in Softimage, which is a relational view that displays SDK information about a selected object. The SDK Explorer is available from Softimage's main menu via the View Scripting SDK Explorer entry.

The SDK Explorer displays information from the scripting object model, and provides links to the scripting reference pages. The Commands and Scripting Reference pages include links to the corresponding C++ reference pages, so you can quickly get to the mirrored C++ information.

The following sections provide a very high-level view of the scripting object model and the C++ class libraries.

Base Class

The basic building block for the Softimage scene in both APIs is SIObject or SIObject, which implements basic information like Name and FullName, Type, Origin and OriginPath, etc. Most objects inherit from SIObject.

Application

Application or Application provides hooks into Softimage for scripted and compiled plug-ins using the following syntax:

- For writing scripted plug-ins running outside of Softimage (for example, NetView pages) you can hook into Softimage using the Application object:

      // JScript
      var xsi_app = new ActiveXObject( XSI.Application );
      var app = xsi_app.Application;
      app.LogMessage( "Initiating NetView session" );

- For writing plug-ins with the C++ API, use the following:

      Application app;
      app.LogMessage( L"Welcome to Softimage!" );

- For writing C# plug-ins with the object model, use this:

      CXSIApplicationClass app = new CXSIApplicationClass();
      app.LogMessage( "Custom Plug-in started", siSeverity.siInfo );

The Application class also provides many essential services, including command creation and execution, add-on installation, access to basic Softimage utilities such as the dictionary, the selection, the desktop, etc.

Utility Classes

There are two classes that are primarily used as base classes for project-level items and scene-level items:

- ProjectItem or ProjectItem—base class for most content objects in the project; for example, objects that inherit from the ProjectItem potentially have parameters. Some of the objects that inherit from the ProjectItem are: Clip or Clip, Source or Source, Operator or Operator, Shader or Shader, Scene or Scene, etc.

- SceneItem or SceneItem—base class for most scene objects; for example, most objects that inherit from the SceneItem potentially have properties. Some of the objects that inherit from the SceneItem are: Cluster or Cluster, Group or Group, Model or Model, X3DObject or X3DObject, etc.

3D Scene Objects

The main class that manages 3D scene objects is X3DObject or X3DObject, which implements functions to create child objects, allows access to the geometry and provides navigation through its children.

These are some of the more typical functions you could use to access the data on a scene object:

- SceneItem.Properties or SceneItem::GetProperties—inherited from the SceneItem or SceneItem class, this provides access to the object's property sets. From here you can access the individual parameters with ProjectItem.Parameters property or ProjectItem::GetParameters member function.

- X3DObject.ActivePrimitive property or X3DObject::GetActivePrimitive member function—this provides access to the object's geometry through the Primitive or Primitive. The Geometry or Geometry object gives you low-level access to the object's subcomponents.

- X3DObject.Kinematics property or X3DObject::GetKinematics member function—this provides access to a special kind of property containing data controling position, scaling, rotation, etc.

- AddXXX—there are several functions that add specific types of elements as children under the scene object (including the Scene_Root, which is a kind of X3DObject or X3DObject). The most common of these is the AddGeometry or AddGeometry function, which allows you to add new cubes, spheres, etc.

- FindChild or FindChild, FindChildren or FindChildren, X3DObject.Children property or X3DObject::GetChildren member function—these provide navigational tools that allow you to find specific objects (or kinds of objects) under the scene object (again, including the Scene_Root).

Content Classes

There are many classes implemented in the object model that represent specific Softimage items, such as Shader or Shader, Camera or Camera, Vertex or Vertex, ImageClip or ImageClip, Port or Port, etc.

Global and Utility Classes

There are several global (intrinsic) and utility classes that provide extra value. These include:

- Application or Application class—hooks into Softimage and essential services.

- Math features—these are implemented through the XSIMath object in the object model and the XSI::MATH namespace in the C++ API. They provide convenience methods and interfaces for math.

- UI Toolkit or UI Toolkit—this provides access to tools that you can use to help build a user interface, such as the ProgressBar or ProgressBar and the MsgBox or MsgBox functionality.

- XSIUtils object—this is only available in the object model. It provides access to general utilities such as the DataRepository and Linktab.