Samples/Story/VideoClip.py

# Copyright 2012 Autodesk, Inc.  All rights reserved.
# Use of this software is subject to the terms of the Autodesk license agreement 
# provided at the time of installation or download, or which otherwise accompanies
# this software in either electronic or hard copy form.
#
# Script description:
# Shows new properties ImageSequence, UseSystemFrameRate and FrameRate of video story clip, these properties
# are used to control the playing of image sequence independent of underlying video clip.
#
# Topic: FBStoryClip, FBVideoClip, FBStoryTrack
#
from pyfbsdk import *
import os.path

# Create a video story track
lTrackVideo = FBStoryTrack(FBStoryTrackType.kFBStoryTrackVideo) 
# Create a video clip using samples images, or change the path to where image sequence locates
lPath = os.path.join(FBSystem().ConfigPath, 'Scripts/Samples/Story/sample_image_sequence0000.jpg')
lPath = os.path.normpath(lPath)
lVideo = FBVideoClip(lPath)

# Use this video clip to create a video story clip on the video track
lClip = FBStoryClip (lVideo, lTrackVideo, FBTime(0,0,0,0))

# Drag the video track to viewer, chose video plane, play on transport control for test
# Specify the new property values for video story clip
# Need to set UseSystemFrameRate to False before FrameRate can be changed
lClip.ImageSequence = True
lClip.UseSystemFrameRate = False
lClip.FrameRate = 30