Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / [SOLVED]Set Fcurve to constant on constraint weight
  RSS 2.0 ATOM  

[SOLVED]Set Fcurve to constant on constraint weight
Rate this thread
 
46823
 
Permlink of this thread   Subscribe to this thread
avatar
  • Seb123
  • Posted: 01 September 2010 08:23 AM
  • Total Posts: 92
  • Joined: 05 November 2009 10:41 AM

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.

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



Replies: 0
avatar
  • Seb123
  • Posted: 01 September 2010 10:06 PM

I found out.

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



Replies: 0




   
  Settings Choose Theme color: