Tasks/SetAllToDoneInAllTakes.py

Tasks/SetAllToDoneInAllTakes.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 # Script that will set ModelOpticalMarker Done property to true
8 #
9 # Topic: FBProperty
10 #
11 
12 from pyfbsdk import FBSystem, FBComponent
13 
14 lSystem = FBSystem()
15 lOriginalTakeName = lSystem.CurrentTake
16 
17 for lTakeIdx in range( len( lSystem.Scene.Takes )):
18  lSystem.CurrentTake = lSystem.Scene.Takes[lTakeIdx]
19  for lMarker in FBSystem().Scene.Components:
20  if lMarker and lMarker.ClassName() == "FBModelMarkerOptical":
21  lDone = lMarker.PropertyList.Find('Done')
22  lDone.Data = True
23 
24 lSystem.CurrentTake = lOriginalTakeName
25 print 'All Markers Set to Done in All Takes'
26 
27 del( lSystem, lTakeIdx, lOriginalTakeName )
28 
29 del(FBSystem, FBComponent)