from pyfbsdk import *
from pyfbsdk_additions import *
AnimationNode = None
def PopulateLayout(mainLyt):
Editor = FBFCurveEditor()
x = FBAddRegionParam(0,FBAttachType.kFBAttachLeft,"")
y = FBAddRegionParam(0,FBAttachType.kFBAttachTop,"")
w = FBAddRegionParam(0,FBAttachType.kFBAttachRight,"")
h = FBAddRegionParam(0,FBAttachType.kFBAttachBottom,"")
mainLyt.AddRegion("FCurveEditor","FCurveEditor", x, y, w, h)
mainLyt.SetControl("FCurveEditor",Editor)
AnimationNode = FBAnimationNode("Test")
FCurve = FBFCurve().CreateInterpolatorCurve( FBInterpolatorCurveType.kFBInterpolatorCurveSmoothOut )
AnimationNode.FCurve = FCurve
Editor.AddAnimationNode( AnimationNode )
FCurve.FBDelete()
def CreateTool():
t = CreateUniqueTool("FCurve editor sample")
t.StartSizeX = 300
t.StartSizeY = 300
PopulateLayout(t)
ShowTool(t)
CreateTool()