UI/FBCamera.py

UI/FBCamera.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 # Topic: FBArrowButton, FBCamera, FBModelMarker
7 #
8 
9 from pyfbsdk import FBCamera, FBModelMarker, FBVector3d, FBModelShadingMode
10 
11 # We want to create a camera with a marker as an interest.
12 lCamera = FBCamera('aFBCamera')
13 lInterest = FBModelMarker('aFBModelMarker')
14 
15 # Set the camera translation, and set the interest
16 lCamera.Translation = FBVector3d( -25, 25, 10 )
17 lCamera.Interest = lInterest
18 
19 # We have to make the new objects visible for them to be added to the scene.
20 lCamera.Visible = True
21 lCamera.Show = True
22 lInterest.Visible = True
23 
24 # Cleanup everything.
25 del( lCamera, lInterest, FBCamera, FBModelMarker, FBVector3d, FBModelShadingMode )