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.
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.
- See also:
-
Track,
Clip, Model::GetMixer,
ClipContainer, AddTransition
- Since:
- 4.0
- Example:
- Demonstrates how to create a
Transition between two clips.
using namespace XSI;
Application app;
Model root = app.GetActiveSceneRoot();
X3DObject myCube;
root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube );
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);
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);
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;
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());