New Features

 

C# Integration

FCurve API Improvements

Python Integration

Rigid Body API

Tracking Reference Model Changes

Changes to the Object Model Affecting COM Plug-ins

Rendering Commands Completely Removed from XSI

Custom Renderer Plug-in

Documentation Improvements

C# Integration

C# (pronounced "C sharp") is a simple, type-safe programming language that represents a hybrid between C++ and scripting languages. As of v6.0, XSI plug-ins can be written in C#. For more information, see C# Development.

Custom operators and render event types implemented in C# are not yet fully supported for rendering. C# operators will not be evaluated during a render pass.

C# events can work as long as the callback code doesn't try to pull on the operator graph. Operations such as object creation, object deletion or parameter value requests can put XSI in an unstable state.

FCurve API Improvements

More control over function curves is available as of v6.0. New functions include:

Scripting Access

C++ API Access

FCurve.ExtendCycle

FCurve.GetKeysBetween

FCurve.GetMaxKeyFrame

FCurve.GetMaxKeyValue

FCurve.GetMidKeyFrame

FCurve.GetMidKeyValue

FCurve.GetMinKeyFrame

FCurve.GetMinKeyValue

FCurve.MakeRotationsContinuous

FCurve.Mute

FCurve.Offset

FCurve.OffsetKeys

FCurve.Scale

FCurve.ScaleKeys

FCurve.Selected

FCurve.SelectedKeys

FCurve.SnapToNearestFrame

FCurveKey.Selected

FCurveKeyCollection.Add

FCurveKeyCollection.AddItems

FCurveKeyCollection.GetMaxKeyFrame

FCurveKeyCollection.GetMaxKeyValue

FCurveKeyCollection.GetMidKeyFrame

FCurveKeyCollection.GetMidKeyValue

FCurveKeyCollection.GetMinKeyFrame

FCurveKeyCollection.GetMinKeyValue

FCurveKeyCollection.Remove

FCurveKeyCollection.RemoveAt

XSIApplication.FCurveSelection

XSIFactory.CreateFCurveKeyCollection

Application::GetFCurveSelection

FCurve::ExtendCycle

FCurve::GetKeysBetween

FCurve::GetMaxKeyFrame

FCurve::GetMaxKeyValue

FCurve::GetMidKeyFrame

FCurve::GetMidKeyValue

FCurve::GetMinKeyFrame

FCurve::GetMinKeyValue

FCurve::GetMute

FCurve::GetSelected

FCurve::GetSelectedKeys

FCurve::MakeRotationsContinuous

FCurve::Offset

FCurve::OffsetKeys

FCurve::PutMute

FCurve::Scale

FCurve::ScaleKeys

FCurve::SnapToNearestFrame

FCurveKey::GetIndex

FCurveKey::GetSelected

Python Integration

New Python-compliant methods have added to the object model that provide the same functionality as those properties that use input parameters. For example, the FCurveKey.Constraint property takes an siFCurveKeyConstraint value as input to test whether the specified constraint has been set. Since Python does not support input parameters on properties, you need to use the new compliant method, FCurveKey.GetConstraint2. Here is a list of new Python-compliant methods with their non-compliant property counterparts:

Python-compliant method

Non-compliant property

Envelope.GetWeights2

Envelope.Weights

FCurveKey.GetConstraint2

FCurveKey.Constraint

FCurveEditor.GetEditorAttribute2

FCurveEditor.EditorAttribute

FCurveEditor.GetSelectedKeys2

FCurveEditor.SelectedKeys

KinematicState.GetTransform2

KinematicState.PutTransform2

KinematicState.Transform

Operator.GetPort2

Operator.Port

Parameter.GetValue2

Parameter.Value

Primitive.GetGeometry2

Primitive.Geometry

ProjectItem.IsSelected

ProjectItem.SetAsSelected

ProjectItem.Selected

StaticKinematicState.GetTransform2

StaticKinematicState.Transform

UserDataMap.GetItem2

UserDataMap.Item

UserDataMap.GetItemSize2

UserDataMap.ItemSize

UserDataMap.GetItemValue2

UserDataMap.ItemValue

X3DObject.GetModels2

X3DObject.Models

XSIApplication.GetInstallationPath2

XSIApplication.InstallationPath

 

Don’t forget to check Issues with Python if you have a question or run into problems when using Python in XSI. And for deciphering error messages (including Python-specific problems), check out the scripting Troubleshooting section.

Rigid Body API

Two new classes have been implemented in the C++ API to facilitate working with rigid bodies: CRigidBodyAccessor and CRigidConstraintAccessor. These classes provide optimized access to the data and property values of a rigid body dynamics object and constraint object.

Tracking Reference Model Changes

For v6.0, there is now scripting and C++ API access to track modifications on reference models using the Delta system, which replaces the old Model Source and Clip system. Deltas store changes for all resolutions of a reference model and any nested reference models. There are two types of changes that Deltas store:

1. ActionDeltas, which can store the following:

- active resolution of a sub-reference model

- additions, removals or changes to animation on the current reference model (including constraints, operators, expressions, static values, and function curves)

- group relations (objects added to a group, a layer or a pass)

2. Override changes

Creating Deltas

There are three ways deltas can be added to a reference model:

• When the user makes a change to a value or source on a parameter in a reference model, a new Delta is automatically created containing an ActionDelta with the ActionDeltaItem to store the change.

• Add an empty Delta using the AddDelta command.

• Import a delta using the ImportDelta or ImportReferencedDelta commands.

Accessing Existing Deltas

You can access deltas by using the Dictionary.GetObject method in the object model:

// C#
using XSIOM;
CXSIApplicationClass oApp = new CXSIApplicationClass();
Dictionary oDict = oApp.Dictionary;
Delta oDelta = oDict.GetObject("MyModel.Delta");

 

// JScript
var oDelta = Dictionary.GetObject("MyModel.Delta");

 

# Python
oApp = Application
oDict = oApp.Dictionary
oDelta = oDict.GetObject("MyModel.Delta")

For the the C++ API, use CRef::Set:

// C++ API
using namespace XSI;
Application app;

CRef refDelta;
refDelta::Set(L"MyModel.Delta"); // Use the path to set the reference
Delta oDelta(refDelta); // Get the Delta object from the reference

Modifying the Contents of Deltas

You can export, import, and apply deltas. You can also edit and delete deltas and items within deltas, and even change a delta’s target model. Items stored in the delta are resolved by object and parameter names.

Delta Reference Pages

Here is a list of the new commands, object model interfaces:

Related Commands

Object Model Access

C++ API Access

AddDelta

AddRefModelResolution

ApplyDelta

CommitToReference

ConvertToRefModel

CreateModelAndConvertToRef

CreateRefModel

ExportDelta

GetExternalReferences

ImportDelta

ImportReferencedDelta

InspectExternalReference

RemoveRefModelResolution

RemoveUnusedDeltas

ToggleReferencedModel

UpdateExternalReference

ActionDelta

ActionDeltaCollection

ActionDeltaItem

ActionDeltaItemCollection

Delta

ActionDelta

ActionDeltaItem

Delta

 

The Delta system replaces the obsolete system of tracking modifications via model sources and clips. As a result, the following commands have been deprecated as of v6.0:

AddModelSource

CreateModelClip

GetLightListOnModelClip

SetLightListOnModelClip

SIAddModelSource

SICreateModelClip

Changes to the Object Model Affecting COM Plug-ins

All COM plug-ins compiled prior to v6.0 will need to be recompiled (C++ self-installing plug-ins don't have to be recompiled).

These properties are no longer defined as default properties and must be used explicitly:

Argument.Value

FCurveKey.Value

InputPort.Value

OutputPort.Value

UserDataItem.Value

Example

// wrong syntax 
oCmd.Arguments.Item(0) = 678 

// right syntax
oCmd.Arguments.Item(0).Value = 678 

Rendering Commands Completely Removed from XSI

The following are no longer recognized commands in XSI:

• AbortFramePreview

• CopyRenderOptions

• CopyRenderWindow

• FramePreviewActiveCamera

• FramePreviewAllLayers

• FramePreviewCurrentLayer

• FramePreviewSelection

• FramePreviewSetup

• FramePreviewVisibleLayers

• OverrideLightShader

• RefreshRegion (use RenderRegionRefresh instead)

• ResetRenderFilePaths

• SaveRegionAs (use RenderRegionSave instead)

• SetRGB (use RenderRegionSetDisplayType instead)

• ToggleAlphaCompose (use RenderRegionSetDisplayType instead)

• ToggleAlphaOnly (use RenderRegionSetDisplayType instead)

• ToggleFreezeRefresh (use RenderRegionToggleAutoRefresh instead)

• ToggleRegionVisibility (use RenderRegionToggleVisibility instead)

• ToggleSelectionTracking (use RenderRegionToggleSelectionTracking instead)

Any scripts referencing these commands will fail in v6.0 and their documentation has been completely removed (since these commands no longer function).

Custom Renderer Plug-in

A Custom Renderer is a self-installing plug-in written in C++. The plug-in allows you to make a third-party rendering engine available in XSI. In XSI, the custom renderer will appear in the list of rendering engines; for example, for scene, region, and pass rendering, and for shader balls.

A custom renderer provides callbacks to handle rendering events such as render regions, shaderballs, interactive rendering from the XSI GUI, and batch rendering.

 

For more information, see Custom Renderers.

Documentation Improvements

There have been many enhancements to the SDK Documentation for v6.0, both in content and accessibility:

Easy Access to Softimage SDK Wiki

New Filtered Reference Index

Improved Global Index

Exhaustive Preset Lists

C# Syntax Replaces COM Syntax

Enums and String Constants

Enhancements to Existing Documentation

Easy Access to Softimage SDK Wiki

 

The main toolbar on the SDK Documentation help file now contains a button that links directly to the SDK Wiki. When you click it, the SDK Wiki is available directly within the main content panel, but the TOC, Index, and Search is still there so you can return to the contents of the guide when you are finished with the Wiki.

New Filtered Reference Index

 

The Global Index is still available as usual; however, if you want to find a reference page using a smaller sample, you can use the new Filtered Reference Index. The Filtered Index gives you a choice of restricting the index you want to browse to one of the following:

• Scripting commands only

• Objects, methods, properties and enums

• C++ API class library

• Crosswalk SDK class library

The Filtered Index is also now accessible from the main SDK Documentation toolbar.

Improved Global Index

The index has been cleaned up, particularly in the area of the C++ API Reference. There is less clutter in general, more strategic keywords, and wherever possible, the same interface or function name gives you a choice between the object model reference and its counterpart in the C++ API.

As of v6.0, you can also look up an enum or string constant by its value. For example, if you see the enum value siLock and don’t know which enum it belongs to, now you can type it into the keyword box on the Index page to find the right enum.

In addition, in previous versions there were some broken links in the index for some enums and string constants, which have been fixed in this version.

Exhaustive Preset Lists

Prior to v6.0, only ConnectionSet information for operators and Constraint Presets have been provided. As of v6.0, lists of Model Presets, Pass Presets, Primitive Presets, Property Presets, and Shader Presets are provided, containing links to the associated parameter reference page.

Links to these preset lists have also been added to the command and object model reference wherever relevant. For example, the X3DObject.AddGeometry method and the CreatePrim command provide a link to the list of Geometry Primitive presets (which are the only valid type of primitive presets).

C# Syntax Replaces COM Syntax

The old COM/C++ syntax strings have been removed from the command and object model reference pages and replaced by the C# syntax strings to help developers understand how to use C# with the XSI object model.

Enums and String Constants

The documentation for the enum and string constants was validated and extra access to individual enum values was added to the index (see Better Index above). C++ API users will be pleased to see that the enums and string constants have been organized better in the C++ API reference guide, and the string constants are more accurately presented (as true string declarations, rather than pseudo-enums).

Enhancements to Existing Documentation

Among other updates and new features, the following improvements were made to the content of existing documentation:

Output Arguments Clarified
Issues about output arguments have been clarified both in the development topic (including a new table listing support by language) and on each reference page where output arguments are used.

CollectionItem Errata Corrected
Many of the reference pages for the scripting commands referred to the CollectionItem interface for the type of object returned or used in parameters for the command. Almost all of these erroneous references have been replaced by a link to the actual interface. For example, the return value for the MergeClips command is now correctly reported as an ActionSource.

More About Using the Selection
The Selection topic in Plug-in Development has been overhauled and updated to better explain how to access and manipulate what’s selected in XSI via the Selection object model interface and C++ API class. Of particular interest are the sections on accessing (sub)components for the object model and the C++ API. In addition, for the sake of clarity, the information about using the scripting commands to access and manipulate the selection has been moved under Script Development.

 

 



SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index