MotionBuilder Forum
Welcome to Autodesk’s MotionBuilder Forums. Share your knowledge, ask questions, and explore popular MotionBuilder topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[SOLVED]Set Fcurve to constant on constraint weight

1 REPLY 1
Reply
Message 1 of 2
SebastianFro
222 Views, 1 Reply

[SOLVED]Set Fcurve to constant on constraint weight

I have this bit off code which works fine on the offset T and R for the parent constraint. But it doesn't work for the weight.

All I need is to key it and set the fcurve interpolation as constant.

And is there an easier way to set all the curves on that constraint to constant.

        W = c.Weight
W.Animatable = True
W.Key ()


print dir (W)

WanimNodes = W.GetAnimationNode ().Nodes
for WNodes in WanimNodes:
WCurves = WNodes.FCurve
for i in WCurves.Keys:
i.Interpolation = FBInterpolation.kFBInterpolationConstant
i.TangentConstantMode = FBTangentConstantMode.kFBTangentConstantModeNext



Thanks
1 REPLY 1
Message 2 of 2
SebastianFro
in reply to: SebastianFro

I found out.

The weightt doesnt have any nodes under it, off course, so just skip the .Nodes and go straight to .FCurves.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report