コンテナ内の各Transitionオブジェクトを含むTransitionCollectionを戻します。
// get accessor TransitionCollection rtn = ClipContainer.Transitions; |
# # This example demonstrates how to retrieve transitions from a clip container # Application.NewScene( None, False ) oRoot = Application.ActiveSceneRoot oCube = oRoot.AddGeometry( "Cube", "MeshSurface") # Creating the first animation source sParams = "cube.kine.local.posx,cube.kine.local.posy,cube.kine.local.posz" oSource = Application.StoreAction(oRoot, sParams, 1, "StoredStaticPose", 1, 1, 5, 0, 0) # Creating the first clip oClip = Application.AddClip(oRoot, oSource) Application.LogMessage("First created clip " + oClip.FullName ) oCube.Parameters("posx").Value = 3.0 # Creating the second animation source oSource2 = Application.StoreAction(oRoot, sParams, 1, "StoredStaticPose", 1, 7, 9, 0, 0) # Creating the second clip oClip2 = Application.AddClip(oRoot, oSource2) def PrintTransition(oTransition): "This function prints the transition name and type along with the starting and end clip" 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) Application.LogMessage(PrintTransition.__doc__) oTransition = Application.AddTransition(oClip, oClip2, 0) PrintTransition(oTransition) oMixer = oRoot.Mixer for oTrns in oMixer.Transitions: PrintTransition(oTrns) # Output of above script: #INFO : First created clip Mixer.Mixer_Anim_Track.StoredStaticPose_Clip # #INFO : This function prints the transition name and type along with the starting and end 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 #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 |