Hey,
I am trying to apply a Story Video Track to be a material on a video plane. This is to allow easy offsetting/trimming of the video using the clip in story mode.
I have managed to create the Video Track, import a video and create the plane but I can't seem to work out how I apply this track to the plane. At the bottom of the following script I've been trying to create textures and materials to use this Video Track somehow. The problem is I can't seem to aplly the video track to anything.
Any help would be much appreciated.
# Create a video story track
FRVideoTrack = FBStoryTrack(FBStoryTrackType.kFBStoryTrackVideo)
FRVideoTrack.Label = 'MyVideoTrack'
# Create a video clip
FRPath = os.path.join("C:\Video\Test.mov")
FRPath = os.path.normpath(FRPath)
FRVideo = FBVideoClip(FRPath)
# Use this video clip to create a video story clip on the video track
FRClip = FBStoryClip (FRTexture, FRVideoTrack, FBTime(0,0,0,0))
# Create the Plane.
VideoPlane = FBModelPlane('My_Plane')
VideoPlane.Visible = True
VideoPlane.Show = True
# VideoPlane.SetVector( FBVector3d( 50, 50, 50 ) )
VideoPlane.SetVector( FBVector3d( 0.2, 1, 0.3 ), FBModelTransformationType.kModelScaling )
VideoPlane.SetVector( FBVector3d( 90, 0, 0 ), FBModelTransformationType.kModelRotation )
# Create a texture
FRTexture = FBTexture('My_Texture')
FRTexture.Video = FRVideo
# Create a material
FRMaterial = FBMaterial("My_Material")
# Set texture to material's diffuse channel.
FRMaterial.SetTexture(FRTexture, FBMaterialTextureType.kFBMaterialTextureDiffuse)
# Attach material to plane
MyPlane.Materials.append(FRTexture)