Community
def FindAnimationNode( pParent, pName ):#standard find animation node def
lResult = None
for lNode in pParent.Nodes:
if lNode.Name == pName:
lResult = lNode
break
return lResult
constr = None
box = None
for thisConstr in FBSystem().Scene.Constraints:
if "Relation" == thisConstr.Name:
constr = thisConstr
if constr:
for thisBox in constr.Boxes:
if "FCurve Number (%)" == thisBox.Name:
box = thisBox
print box.Animatable #this shows up as False
if box:
nodeToSet = FindAnimationNode(box.AnimationNodeInGet(),"Position %")
nodeToSet.WriteData()
from pyfbsdk import *
def FindAnimationNode( pParent, pName ):
lResult = None
for lNode in pParent.Nodes:
if lNode.Name == pName:
lResult = lNode
break
return lResult
lRelation = FBConstraintRelation('TEST')
lFcurveBox = lRelation.CreateFunctionBox( 'Other', 'FCurve Number (%)' )
lValue = FindAnimationNode( lFcurveBox.AnimationNodeOutGet(), 'Value' )
lCurve = lValue.FCurve
lCurve.EditBegin()
lTime = FBTime( 0, 0, 0, 20 )
lKey = lCurve.KeyAdd( lTime, 20 )
lKeyFrame = lCurve.Keys
lKeyFrame.RightDerivtive = 7
lKeyFrame.LeftDerivative = 7
lCurve.EditEnd()
Can't find what you're looking for? Ask the community or share your knowledge.