# Copyright 2009 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: # Create a Camera, a shotTrack insert a shot clip associated to this Camera # # Topic: FBStoryTrack, FBStoryTrackType, FBStory # from pyfbsdk import * # create a Camera shotName= "My Camera" lCam = FBCamera (shotName) lCam.Visible = True lCam.Show = True lNull = FBModelNull (shotName + "_INT") lCam.Interest = lNull # Create a new ShotTrack. Don't forget to specify to add it to the RootEditFolder lTrackContainer = FBStoryTrack(FBStoryTrackType.kFBStoryTrackShot, FBStory().RootEditFolder) # find our cameras in the camera list cameras = FBSystem().Scene.Cameras for cam in cameras: if cam.Name == shotName: clipStart = FBTime(0,0,0,0) # Insert a clip into our newly created shot track lClip = FBStoryClip (cam, lTrackContainer, clipStart)