Related Scripting Object: Transition | Supported Parameter List: Transition
This object represents a transition between two clips. A transition is an interpolation used to smooth passing from the end of one clip to the beginning of another. More...
#include <xsi_transition.h>
Inheritance diagram for Transition:

Public Member Functions |
|
| Transition () | |
| ~Transition () | |
| Transition (const CRef &in_ref) | |
| Transition (const Transition &in_obj) | |
| bool | IsA (siClassID in_ClassID) const |
| siClassID | GetClassID () const |
| Transition & | operator= (const Transition &in_obj) |
| Transition & | operator= (const CRef &in_ref) |
| Clip | GetStartClip () const |
| Clip | GetEndClip () const |
| CRefArray | GetItems () const |
You can get at the Transition object from the ClipContainer::GetTransitions function. Calling SIObject::GetType on the Transition object returns one of the strings defined under the siTransitionType.
using namespace XSI; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube ); // Creating the first animation source CValueArray args(9); CValue outArg; args[0] = root; args[1] = L"cube.kine.local.posx,cube.kine.local.posy,cube.kine.local.posz"; args[2] = 1l; args[3] = L"StoredStaticPose"; args[4] = true; args[5] = 1l; args[6] = 5l; args[7] = false; args[8] = false; app.ExecuteCommand( L"StoreAction", args, outArg ); Source mySource(outArg); // Creating the first clip CValueArray addClipArgs(6); addClipArgs[0] = root; addClipArgs[1] = mySource.GetFullName(); addClipArgs[5] = L"MyClip1"; app.ExecuteCommand( L"AddClip", addClipArgs, outArg ); Clip myClip(outArg); myCube.PutParameterValue(L"posx", 3.0f); // Creating the second animation source args[1] = L"cube.kine.local.posx,cube.kine.local.posy,cube.kine.local.posz"; args[5] = 7l; args[6] = 9l; app.ExecuteCommand( L"StoreAction", args, outArg ); mySource = outArg; // Creating the second clip from the second source. // Put it on the same track as the first one. addClipArgs[0] = root; addClipArgs[1] = mySource.GetFullName(); addClipArgs[3] = myClip.GetParent(); addClipArgs[5] = L"MyClip1"; app.ExecuteCommand( L"AddClip", addClipArgs, outArg ); Clip myClip2(outArg); CValueArray addTransitionArgs(3); addTransitionArgs[0] = myClip; addTransitionArgs[1] = myClip2; addTransitionArgs[2] = 0l; app.ExecuteCommand( L"AddTransition", addTransitionArgs, outArg ); Transition myTransition(outArg); app.LogMessage(L"The transition " + myTransition.GetFullName() + L" is of type " + myTransition.GetType()); Clip startClip = myTransition.GetStartClip(); app.LogMessage(L"The clip at the beginning of the transition is " + startClip.GetFullName()); Clip endClip = myTransition.GetEndClip(); app.LogMessage(L"The clip at the end of the transition is " + endClip.GetFullName());
| Transition | ( | ) |
Default constructor.
| ~Transition | ( | ) |
Default destructor.
| Transition | ( | const CRef & | in_ref | ) |
Constructor.
| in_ref | constant reference object. |
| Transition | ( | const Transition & | in_obj | ) |
Copy constructor.
| in_obj | constant class object. |
| bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
| in_ClassID | class type. |
Reimplemented from ProjectItem.
| siClassID GetClassID | ( | ) | const [virtual] |
Returns the type of the API class.
Reimplemented from ProjectItem.
| Transition& operator= | ( | const Transition & | in_obj | ) |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
| in_obj | constant class object. |
| Transition& operator= | ( | const CRef & | in_ref | ) |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
| in_ref | constant class object. |
Reimplemented from ProjectItem.
| Clip GetStartClip | ( | ) | const |
Returns the clip at the beginning of the Transition.
| Clip GetEndClip | ( | ) | const |
Returns the clip at the end of the Transition.
| CRefArray GetItems | ( | ) | const |
Returns the channels which are used in this transition. The channels are the objects for which the value is interpolated, common objects retrieved with MappedItem::GetDestination.