Tasks/ShowMachineNameAndCameraNamePlusResolution.py

Tasks/ShowMachineNameAndCameraNamePlusResolution.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: FBSystem.ComputerName
7 #
8 from pyfbsdk import FBSystem, FBMessageBox, FBCamera
9 
10 # Create global objects needed for our work...
11 lSystem = FBSystem()
12 
13 # Show the machine name...
14 FBMessageBox( "Machine Name", "This machine is named '%s'" % lSystem.ComputerName, "OK" )
15 
16 # And infos on one camera...
17 FBMessageBox( "Last Camera",
18  "The last camera in the list is named '%s'\nand uses resolution mode '%s'" %
19  ( lSystem.Scene.Cameras[-1].Name, lSystem.Scene.Cameras[-1].ResolutionMode ),
20  "OK" )
21 
22 # Cleanup
23 
24 # Cleanup things from pyfbsdk
25 del( FBSystem, FBMessageBox )
26 
27 # Cleanup local variables
28 del( lSystem )