Object Hierarchy | 関連する C++クラス:ClipContainer
ClipContainer
v4.0
ClipContainer オブジェクトはMixerまたはコンパウンドクリップのいずれかを表します。両方とも他の Clip、Track、および Transition を含めることができます。
このオブジェクトによりミキサ: クリップ、トラック、トランジション、および ClipRelation の基本要素にアクセスできます。
CreateCompound
コマンドでコンパウンドクリップを作成できます。
# # This example demonstrates how to create a compound clip from scripting. # It also shows that when retrieving clips from the ClipContainer it only # returns clips that are on tracks nested directly under it. # Application.NewScene( "", 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) Application.LogMessage("Second created clip " + oClip2.FullName) def PrintClips(oClipCollection): "This function print the clip names contained in a clip collection" for i in range(oClipCollection.Count): Application.LogMessage("Clip " + oClipCollection(i).FullName) Application.LogMessage(PrintClips.__doc__) oMixer = oRoot.Mixer Application.LogMessage("List of clips retrieved from the container") PrintClips(oMixer.Clips) # Creating a compound clip from the clips created earlier myClips = [oClip, oClip2] oCompound = Application.CreateCompound(oRoot, myClips) Application.LogMessage("Compound clip " + oCompound.FullName ) Application.LogMessage("List of clips retrieved from the compound") PrintClips(oCompound.Clips) # Now retrieving once again the clips from under the mixer. # This should only return the CompoundClip. Application.LogMessage("List of clips retrieved from the mixer after the creation of the compound"); PrintClips(oMixer.Clips) # Output of above script: #INFO : First created clip Mixer.Mixer_Anim_Track.StoredStaticPose_Clip # #INFO : Second created clip Mixer.Mixer_Anim_Track1.StoredStaticPose1_Clip #INFO : This function print the clip names contained in a clip collection #INFO : List of clips retrieved from the container #INFO : Clip Mixer.Mixer_Anim_Track.StoredStaticPose_Clip #INFO : Clip Mixer.Mixer_Anim_Track1.StoredStaticPose1_Clip # #INFO : Compound clip Mixer.Mixer_Anim_Track.CompoundAction_Clip #INFO : List of clips retrieved from the compound #INFO : Clip Mixer.Mixer_Anim_Track.CompoundAction_Clip.Mixer_Anim_Track3.StoredStaticPose_Clip #INFO : Clip Mixer.Mixer_Anim_Track.CompoundAction_Clip.Mixer_Anim_Track4.StoredStaticPose1_Clip #INFO : List of clips retrieved from the mixer after the creation of the compound #INFO : Clip Mixer.Mixer_Anim_Track.CompoundAction_Clip |