Object Hierarchy | 関連する C++クラス:Transition
トランジション
v4.0
このオブジェクトは、2 つのクリップ間のトランジションを表しています。トランジションは 1 つのクリップの末尾から別のクリップの先頭へスムーズに移動するために使用される補間の 1 つです。トランジションオブジェクトにアクセスするには、ClipContainer.Transitionsプロパティを使用します。基準プロパティSIObject.Typeは、siTransitionTypeの下に定義されているいずれかの文字列を戻します。
#
# This example demonstrates how to create a Transition between two clips.
#
Application.NewScene("", 0)
oRoot = Application.ActiveSceneRoot
oCube = oRoot.AddGeometry( "Cube", "MeshSurface")
# Create the first animation source
oSource = Application.StoreAction(oRoot, "cube.kine.local.posx,cube.kine.local.posy,cube.kine.local.posz",
1, "StoredStaticPose", 1, 1, 5, 0, 0)
# Create the first clip
oClip = Application.AddClip(oRoot, oSource)
Application.LogMessage("First created clip " + oClip.FullName )
# Create the second animation source
oCube.Parameters("posx").Value = 3.0
oSource2 = Application.StoreAction(oRoot, "cube.kine.local.posx,cube.kine.local.posy,cube.kine.local.posz",
1, "StoredStaticPose", 1, 7, 9, 0, 0)
# Create the second clip
oClip2 = Application.AddClip(oRoot, oSource2)
Application.LogMessage("Second created clip " + oClip2.FullName)
oTransition = Application.AddTransition(oClip, oClip2, 0)
Application.LogMessage("The transition " + oTransition.FullName + " is of type " + oTransition.Type)
oStartClip = oTransition.StartClip
Application.LogMessage("The clip at the beginning of the transition is " + oStartClip.FullName)
oEndClip = oTransition.EndClip
Application.LogMessage("The clip at the end of the transition is " + oEndClip.FullName)
# Expected Results:
#INFO : First created clip Mixer.Mixer_Anim_Track.StoredStaticPose_Clip
#INFO : Second created clip Mixer.Mixer_Anim_Track1.StoredStaticPose1_Clip
#INFO : The transition Mixer.Transition is of type TransitionStandardType
#INFO : The clip at the beginning of the transition is Mixer.Mixer_Anim_Track.StoredStaticPose_Clip
#INFO : The clip at the end of the transition is Mixer.Mixer_Anim_Track1.StoredStaticPose1_Clip |