BasicOperations/InsertCurrentTake.py

BasicOperations/InsertCurrentTake.py
1 # Copyright 2009 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 # Create character track for the current character and insert current take in it.
8 #
9 # Topic: FBStory, FBScene
10 #
11 
12 from pyfbsdk import *
13 
14 app = FBApplication()
15 system = FBSystem()
16 story = FBStory()
17 scene = system.Scene
18 
19 # create a track for our character:
20 track = FBStoryTrack(FBStoryTrackType.kFBStoryTrackCharacter, story.RootFolder)
21 
22 # assign our CurrentCharacter to the track
23 track.Details.append(app.CurrentCharacter)
24 
25 # Insert current take in the newly created track
26 clip = track.CopyTakeIntoTrack( system.CurrentTake.LocalTimeSpan, system.CurrentTake )