from pyfbsdk import *
def UnselectAll():
for each in Scene.Components:
if each.HasObjectFlags(FBObjectFlag.kFBFlagSelectable):
each.Selected = False
Player = FBPlayerControl()
Scene = FBSystem().Scene
System = FBSystem()
System.CurrentTake.CreateNewLayer()
LayerCount = System.CurrentTake.GetLayerCount()
System.CurrentTake.SetCurrentLayer(LayerCount-1)
NewLayer = System.CurrentTake.GetLayer(LayerCount-1)
NewLayer.Name = "New Layer Created"
cube = FBModelCube("Cube")
cube.Show = True
cube.Visibility = True
cube.Selected = True
Player.Goto(FBTime(0,0,0,0))
cube.Translation = FBVector3d(10,10,10)
cube.Rotation = FBVector3d(10,20,30)
Player.Key()
Player.Goto(FBTime(0,0,0,10))
cube.Translation = FBVector3d(30,30,30)
cube.Rotation = FBVector3d(30,0,20)
Player.Key()