Python Reference Guide
 
Loading...
Searching...
No Matches
Samples\Story\VideoClip.py
1# Copyright 2012 Autodesk, Inc. All rights reserved.
2# Use of this software is subject to the terms of the Autodesk license agreement
3# provided at the time of installation or download, or which otherwise accompanies
4# this software in either electronic or hard copy form.
5#
6# Script description:
7# Shows new properties ImageSequence, UseSystemFrameRate and FrameRate of video story clip, these properties
8# are used to control the playing of image sequence independent of underlying video clip.
9#
10# Topic: FBStoryClip, FBVideoClip, FBStoryTrack
11#
12from pyfbsdk import *
13import os.path
14
15# Create a video story track
16lTrackVideo = FBStoryTrack(FBStoryTrackType.kFBStoryTrackVideo)
17# Create a video clip using samples images, or change the path to where image sequence locates
18lPath = os.path.join(FBSystem().ConfigPath, 'Scripts/Samples/Story/sample_image_sequence0000.jpg')
19lPath = os.path.normpath(lPath)
20lVideo = FBVideoClip(lPath)
21
22# Use this video clip to create a video story clip on the video track
23lClip = FBStoryClip (lVideo, lTrackVideo, FBTime(0,0,0,0))
24
25# Drag the video track to viewer, chose video plane, play on transport control for test
26# Specify the new property values for video story clip
27# Need to set UseSystemFrameRate to False before FrameRate can be changed
28lClip.ImageSequence = True
29lClip.UseSystemFrameRate = False
30lClip.FrameRate = 30
Story Track class.
Definition: pyfbsdk_generated.h:18315
Provides access to the underlying system, and the MotionBuilder scene.
Definition: pyfbsdk_generated.h:18771
Time data structure.
Definition: pyfbsdk_generated.h:19596
Video clip media class.
Definition: pyfbsdk_generated.h:20675